summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/Makefile.am1
-rw-r--r--testsuites/libtests/block05/init.c4
-rw-r--r--testsuites/libtests/block13/Makefile.am19
-rw-r--r--testsuites/libtests/block13/block13.doc11
-rw-r--r--testsuites/libtests/block13/block13.scn11
-rw-r--r--testsuites/libtests/block13/init.c232
-rw-r--r--testsuites/libtests/configure.ac1
-rw-r--r--testsuites/libtests/cpuuse/tswitch.c2
-rw-r--r--testsuites/libtests/flashdisk01/init.c2
-rw-r--r--testsuites/libtests/termios04/termios_testdriver_intr.c4
-rw-r--r--testsuites/psxtests/psxmsgq01/init.c3
-rw-r--r--testsuites/samples/base_mp/init.c18
-rw-r--r--testsuites/samples/base_sp/init.c18
-rw-r--r--testsuites/samples/capture/init.c21
-rw-r--r--testsuites/samples/cdtest/init.c15
-rw-r--r--testsuites/samples/fileio/init.c15
-rw-r--r--testsuites/samples/hello/init.c18
-rw-r--r--testsuites/samples/loopback/init.c6
-rw-r--r--testsuites/samples/minimum/init.c12
-rw-r--r--testsuites/samples/nsecs/init.c7
-rw-r--r--testsuites/samples/paranoia/init.c15
-rw-r--r--testsuites/samples/paranoia/paranoia.c4
-rw-r--r--testsuites/samples/pppd/init.c10
-rw-r--r--testsuites/samples/ticker/init.c15
-rw-r--r--testsuites/samples/unlimited/init.c19
-rw-r--r--testsuites/sptests/sp08/init.c5
-rw-r--r--testsuites/sptests/sp10/init.c5
-rw-r--r--testsuites/sptests/sp18/init.c5
-rw-r--r--testsuites/sptests/sp2038/init.c3
-rw-r--r--testsuites/sptests/sp21/init.c8
-rw-r--r--testsuites/sptests/sp27/init.c11
-rw-r--r--testsuites/sptests/sp28/init.c4
-rw-r--r--testsuites/sptests/sp32/init.c5
-rw-r--r--testsuites/sptests/sp40/init.c5
-rw-r--r--testsuites/sptests/sp41/init.c6
-rw-r--r--testsuites/sptests/sp49/init.c5
-rw-r--r--testsuites/sptests/sp50/init.c8
-rw-r--r--testsuites/sptests/sp51/init.c5
-rw-r--r--testsuites/sptests/sp52/init.c7
-rw-r--r--testsuites/sptests/sp54/init.c14
-rw-r--r--testsuites/sptests/sp55/init.c12
-rw-r--r--testsuites/sptests/sp56/init.c13
-rw-r--r--testsuites/sptests/sp57/init.c13
-rw-r--r--testsuites/sptests/sp58/init.c7
-rw-r--r--testsuites/sptests/sp59/init.c6
-rw-r--r--testsuites/sptests/sp60/init.c5
-rw-r--r--testsuites/sptests/sp62/init.c6
-rw-r--r--testsuites/sptests/sp63/init.c8
-rw-r--r--testsuites/sptests/sp64/init.c5
-rw-r--r--testsuites/sptests/sp65/init.c10
-rw-r--r--testsuites/sptests/sp67/init.c7
-rw-r--r--testsuites/sptests/sp68/init.c3
-rw-r--r--testsuites/sptests/sp69/init.c5
-rw-r--r--testsuites/sptests/sp70/init.c9
-rw-r--r--testsuites/sptests/sp71/init.c5
-rw-r--r--testsuites/sptests/sp72/init.c6
-rw-r--r--testsuites/sptests/sp73/init.c6
-rw-r--r--testsuites/sptests/sp74/init.c5
-rw-r--r--testsuites/sptests/sp75/init.c5
-rw-r--r--testsuites/sptests/sp76/init.c6
-rw-r--r--testsuites/sptests/spassoc01/init.c5
-rw-r--r--testsuites/sptests/spcbssched03/tasks_periodic.c5
-rw-r--r--testsuites/sptests/spchain/init.c5
-rw-r--r--testsuites/sptests/spclockget/init.c5
-rw-r--r--testsuites/sptests/spcoverage/init.c5
-rw-r--r--testsuites/sptests/sperror01/init.c5
-rw-r--r--testsuites/sptests/sperror02/init.c5
-rw-r--r--testsuites/sptests/sperror03/init.c5
-rw-r--r--testsuites/sptests/spfatal21/testcase.h3
-rw-r--r--testsuites/sptests/spfatal_support/consume_sems.c9
-rw-r--r--testsuites/sptests/spfifo01/init.c3
-rw-r--r--testsuites/sptests/spfifo02/init.c11
-rw-r--r--testsuites/sptests/spfifo03/init.c22
-rw-r--r--testsuites/sptests/spfifo04/init.c5
-rw-r--r--testsuites/sptests/spfifo05/init.c10
-rw-r--r--testsuites/sptests/spintrcritical01/init.c7
-rw-r--r--testsuites/sptests/spintrcritical06/init.c7
-rw-r--r--testsuites/sptests/spintrcritical08/init.c7
-rw-r--r--testsuites/sptests/spintrcritical09/init.c7
-rw-r--r--testsuites/sptests/spintrcritical10/init.c5
-rw-r--r--testsuites/sptests/spintrcritical11/init.c6
-rw-r--r--testsuites/sptests/spintrcritical13/init.c6
-rw-r--r--testsuites/sptests/spintrcritical15/init.c5
-rw-r--r--testsuites/sptests/spintrcritical16/init.c5
-rw-r--r--testsuites/sptests/spintrcritical17/init.c3
-rw-r--r--testsuites/sptests/spmountmgr01/init.c42
-rw-r--r--testsuites/sptests/spnotepad01/init.c3
-rw-r--r--testsuites/sptests/spprintk/init.c7
-rw-r--r--testsuites/sptests/spprivenv01/init.c9
-rw-r--r--testsuites/sptests/sprbtree01/init.c3
-rw-r--r--testsuites/sptests/spsimplesched01/init.c4
-rw-r--r--testsuites/sptests/spsimplesched02/init.c11
-rw-r--r--testsuites/sptests/spsimplesched03/init.c3
-rw-r--r--testsuites/sptests/spstkalloc/init.c3
-rw-r--r--testsuites/sptests/spthreadq01/init.c7
-rw-r--r--testsuites/sptests/spwkspace/init.c3
96 files changed, 737 insertions, 240 deletions
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index 1274f2637b..9747ad19c6 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1,6 +1,7 @@
ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS = POSIX
+SUBDIRS += block13
SUBDIRS += rbheap01
SUBDIRS += flashdisk01
diff --git a/testsuites/libtests/block05/init.c b/testsuites/libtests/block05/init.c
index 3d221a98ab..dd5d646a41 100644
--- a/testsuites/libtests/block05/init.c
+++ b/testsuites/libtests/block05/init.c
@@ -151,11 +151,11 @@ static rtems_bdbuf_buffer *get(enum get_type type, enum blk_kind kind)
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum blk_index = 0;
rtems_status_code (*get_bd)(
- const rtems_disk_device *,
+ rtems_disk_device *,
rtems_blkdev_bnum,
rtems_bdbuf_buffer **
) = NULL;
- const rtems_disk_device *dd = NULL;
+ rtems_disk_device *dd = NULL;
size_t bds_per_group = 0;
switch (kind) {
diff --git a/testsuites/libtests/block13/Makefile.am b/testsuites/libtests/block13/Makefile.am
new file mode 100644
index 0000000000..9b4a76d0eb
--- /dev/null
+++ b/testsuites/libtests/block13/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = block13
+block13_SOURCES = init.c
+
+dist_rtems_tests_DATA = block13.scn block13.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(block13_OBJECTS)
+LINK_LIBS = $(block13_LDLIBS)
+
+block13$(EXEEXT): $(block13_OBJECTS) $(block13_DEPENDENCIES)
+ @rm -f block13$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/block13/block13.doc b/testsuites/libtests/block13/block13.doc
new file mode 100644
index 0000000000..04fc066ada
--- /dev/null
+++ b/testsuites/libtests/block13/block13.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: block13
+
+directives:
+
+ TBD
+
+concepts:
+
+ Tests the read-ahead feature of bdbuf.
diff --git a/testsuites/libtests/block13/block13.scn b/testsuites/libtests/block13/block13.scn
new file mode 100644
index 0000000000..8cce71806d
--- /dev/null
+++ b/testsuites/libtests/block13/block13.scn
@@ -0,0 +1,11 @@
+*** TEST BLOCK 13 ***
+0 2 3 4 5 6 7 8
+reset
+8
+reset
+7
+reset
+6 7
+reset
+5 6 8
+*** END OF TEST BLOCK 13 ***
diff --git a/testsuites/libtests/block13/init.c b/testsuites/libtests/block13/init.c
new file mode 100644
index 0000000000..43ce38860e
--- /dev/null
+++ b/testsuites/libtests/block13/init.c
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <errno.h>
+#include <string.h>
+
+#include <rtems/blkdev.h>
+#include <rtems/bdbuf.h>
+
+#define BLOCK_COUNT 9
+#define READ_COUNT 19
+
+static int block_access_counts [BLOCK_COUNT];
+
+#define RESET_CACHE (-1)
+
+static const int action_sequence [READ_COUNT] = {
+ 0, 2, 3, 4, 5, 6, 7, 8,
+ RESET_CACHE,
+ 8,
+ RESET_CACHE,
+ 7,
+ RESET_CACHE,
+ 6, 7,
+ RESET_CACHE,
+ 5, 6, 8
+};
+
+#define UNUSED_LINE { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+
+static int expected_block_access_counts [READ_COUNT] [BLOCK_COUNT] = {
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 0, 1, 0, 0, 0, 0, 0, 0 },
+ { 1, 0, 1, 1, 1, 1, 0, 0, 0 },
+ { 1, 0, 1, 1, 1, 1, 0, 0, 0 },
+ { 1, 0, 1, 1, 1, 1, 1, 1, 0 },
+ { 1, 0, 1, 1, 1, 1, 1, 1, 0 },
+ { 1, 0, 1, 1, 1, 1, 1, 1, 1 },
+ { 1, 0, 1, 1, 1, 1, 1, 1, 1 },
+ UNUSED_LINE,
+ { 0, 0, 0, 0, 0, 0, 0, 0, 1 },
+ UNUSED_LINE,
+ { 0, 0, 0, 0, 0, 0, 0, 1, 0 },
+ UNUSED_LINE,
+ { 0, 0, 0, 0, 0, 0, 1, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 1, 1, 1 },
+ UNUSED_LINE,
+ { 0, 0, 0, 0, 0, 1, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 1, 1, 1, 1 },
+ { 0, 0, 0, 0, 0, 1, 1, 1, 1 }
+};
+
+#define NO_TRIGGER RTEMS_DISK_READ_AHEAD_NO_TRIGGER
+
+#define TRIGGER_AFTER_RESET RTEMS_DISK_READ_AHEAD_NO_TRIGGER
+
+static const rtems_blkdev_bnum trigger [READ_COUNT] = {
+ 1, 3, 5, 5, 7, 7, NO_TRIGGER, NO_TRIGGER,
+ TRIGGER_AFTER_RESET,
+ 9,
+ TRIGGER_AFTER_RESET,
+ 8,
+ TRIGGER_AFTER_RESET,
+ 7, NO_TRIGGER,
+ TRIGGER_AFTER_RESET,
+ 6, 8, NO_TRIGGER
+};
+
+#define NOT_CHANGED_BY_RESET(i) (i)
+
+static const rtems_blkdev_bnum next [READ_COUNT] = {
+ 2, 4, 6, 6, 8, 8, 8, 8,
+ NOT_CHANGED_BY_RESET(8),
+ 10,
+ NOT_CHANGED_BY_RESET(10),
+ 9,
+ NOT_CHANGED_BY_RESET(9),
+ 8, 8,
+ NOT_CHANGED_BY_RESET(8),
+ 7, 9, 9
+};
+
+static int test_disk_ioctl(rtems_disk_device *dd, uint32_t req, void *arg)
+{
+ int rv = 0;
+
+ if (req == RTEMS_BLKIO_REQUEST) {
+ rtems_blkdev_request *breq = arg;
+ rtems_blkdev_sg_buffer *sg = breq->bufs;
+ uint32_t i;
+
+ rtems_test_assert(breq->req == RTEMS_BLKDEV_REQ_READ);
+
+ for (i = 0; i < breq->bufnum; ++i) {
+ rtems_blkdev_bnum block = sg [i].block;
+
+ rtems_test_assert(block < BLOCK_COUNT);
+
+ ++block_access_counts [block];
+ }
+
+ (*breq->req_done)(breq->done_arg, RTEMS_SUCCESSFUL);
+ } else {
+ errno = EINVAL;
+ rv = -1;
+ }
+
+ return rv;
+}
+
+static void test_read_ahead(rtems_disk_device *dd)
+{
+ int i;
+
+ for (i = 0; i < READ_COUNT; ++i) {
+ int action = action_sequence [i];
+
+ if (action != RESET_CACHE) {
+ rtems_blkdev_bnum block = (rtems_blkdev_bnum) action;
+ rtems_status_code sc;
+ rtems_bdbuf_buffer *bd;
+
+ printf("%i ", action);
+
+ sc = rtems_bdbuf_read(dd, block, &bd);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_bdbuf_release(bd);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ rtems_test_assert(
+ memcmp(
+ block_access_counts,
+ expected_block_access_counts [i],
+ sizeof(block_access_counts)
+ ) == 0
+ );
+ } else {
+ printf("\nreset\n");
+
+ rtems_bdbuf_purge_dev(dd);
+ memset(&block_access_counts, 0, sizeof(block_access_counts));
+ }
+
+ rtems_test_assert(trigger [i] == dd->read_ahead.trigger);
+ rtems_test_assert(next [i] == dd->read_ahead.next);
+ }
+
+ printf("\n");
+}
+
+static void test(void)
+{
+ rtems_status_code sc;
+ dev_t dev = 0;
+ rtems_disk_device *dd;
+
+ sc = rtems_disk_io_initialize();
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_disk_create_phys(
+ dev,
+ 1,
+ BLOCK_COUNT,
+ test_disk_ioctl,
+ NULL,
+ NULL
+ );
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ dd = rtems_disk_obtain(dev);
+ rtems_test_assert(dd != NULL);
+
+ test_read_ahead(dd);
+
+ sc = rtems_disk_release(dd);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+
+ sc = rtems_disk_delete(dev);
+ rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+}
+
+static void Init(rtems_task_argument arg)
+{
+ puts("\n\n*** TEST BLOCK 13 ***");
+
+ test();
+
+ puts("*** END OF TEST BLOCK 13 ***");
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
+
+#define CONFIGURE_BDBUF_BUFFER_MIN_SIZE 1
+#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE 1
+#define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE BLOCK_COUNT
+#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 2
+#define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY 1
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
+#define CONFIGURE_INIT_TASK_PRIORITY 2
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index f6af3b11cd..7df0520f87 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -41,6 +41,7 @@ AM_CONDITIONAL(NETTESTS,test "$rtems_cv_RTEMS_NETWORKING" = "yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
+block13/Makefile
rbheap01/Makefile
syscall01/Makefile
flashdisk01/Makefile
diff --git a/testsuites/libtests/cpuuse/tswitch.c b/testsuites/libtests/cpuuse/tswitch.c
index 5635014d28..6933f89ae6 100644
--- a/testsuites/libtests/cpuuse/tswitch.c
+++ b/testsuites/libtests/cpuuse/tswitch.c
@@ -29,7 +29,7 @@
*/
struct taskSwitchLog taskSwitchLog[25];
int taskSwitchLogIndex;
-volatile int testsFinished;;
+volatile int testsFinished;
void Task_switch(
rtems_tcb *unused,
diff --git a/testsuites/libtests/flashdisk01/init.c b/testsuites/libtests/flashdisk01/init.c
index 5ca6614e0c..3c6ffae1af 100644
--- a/testsuites/libtests/flashdisk01/init.c
+++ b/testsuites/libtests/flashdisk01/init.c
@@ -227,7 +227,7 @@ static int flashdisk_blank(
{
int eno = 0;
const uint8_t *current = get_data_pointer(sd, segment, offset);
- const uint8_t *end = current + size;;
+ const uint8_t *end = current + size;
while (eno == 0 && current != end) {
if (*current != 0xff) {
diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.c b/testsuites/libtests/termios04/termios_testdriver_intr.c
index 086bbb3a12..72a5f9e296 100644
--- a/testsuites/libtests/termios04/termios_testdriver_intr.c
+++ b/testsuites/libtests/termios04/termios_testdriver_intr.c
@@ -189,11 +189,11 @@ rtems_device_driver termios_test_driver_initialize(
status = rtems_timer_create(rtems_build_name('T', 'M', 'R', 'X'), &Rx_Timer);
if ( status )
- rtems_fatal_error_occurred(1);;
+ rtems_fatal_error_occurred(1);
status = rtems_timer_create(rtems_build_name('T', 'M', 'T', 'X'), &Tx_Timer);
if ( status )
- rtems_fatal_error_occurred(1);;
+ rtems_fatal_error_occurred(1);
return RTEMS_SUCCESSFUL;
}
diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c
index 2591912127..00e5f29577 100644
--- a/testsuites/psxtests/psxmsgq01/init.c
+++ b/testsuites/psxtests/psxmsgq01/init.c
@@ -48,8 +48,7 @@ void verify_timed_receive(void);
void wait_for_signal(sigset_t *waitset, int sec, int expect_signal);
void verify_notify(void);
void verify_with_threads(void);
-void verify_timedout_mq_timedreceive(
- char *task_name, int que, int is_blocking);;
+void verify_timedout_mq_timedreceive(char *task_name, int que, int is_blocking);
void verify_timedout_mq_timedsend(int que, int is_blocking);
void verify_timed_receive(void);
void validate_mq_setattr(void);
diff --git a/testsuites/samples/base_mp/init.c b/testsuites/samples/base_mp/init.c
index 24c6206f73..e2a9b84002 100644
--- a/testsuites/samples/base_mp/init.c
+++ b/testsuites/samples/base_mp/init.c
@@ -1,16 +1,5 @@
-/* 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.
+/**
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -26,6 +15,9 @@
#include "system.h"
#include <stdio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/samples/base_sp/init.c b/testsuites/samples/base_sp/init.c
index a8ac53921d..8ad2eedecf 100644
--- a/testsuites/samples/base_sp/init.c
+++ b/testsuites/samples/base_sp/init.c
@@ -1,16 +1,5 @@
-/* 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-2011.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -27,6 +16,9 @@
#include "tmacros.h"
#include <stdio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define ARGUMENT 0
rtems_task Init(
diff --git a/testsuites/samples/capture/init.c b/testsuites/samples/capture/init.c
index 28eeb57934..67f87dd9d0 100644
--- a/testsuites/samples/capture/init.c
+++ b/testsuites/samples/capture/init.c
@@ -1,16 +1,5 @@
-/* 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.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may in
@@ -33,6 +22,12 @@
#include <rtems/monitor.h>
#include <rtems/shell.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+#if !BSP_SMALL_MEMORY
+ static void notification(int fd, int seconds_remaining, void *arg);
+#endif
+
volatile int can_proceed = 1;
#if !BSP_SMALL_MEMORY
diff --git a/testsuites/samples/cdtest/init.c b/testsuites/samples/cdtest/init.c
index 3c1cf538e1..280de0cfbc 100644
--- a/testsuites/samples/cdtest/init.c
+++ b/testsuites/samples/cdtest/init.c
@@ -1,16 +1,5 @@
-/* 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.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index 92139e4569..75d16a4909 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -1,16 +1,5 @@
-/* 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-2011.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
index 01b14b8111..8a44a88991 100644
--- a/testsuites/samples/hello/init.c
+++ b/testsuites/samples/hello/init.c
@@ -1,16 +1,5 @@
-/* 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.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -27,6 +16,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/samples/loopback/init.c b/testsuites/samples/loopback/init.c
index 0feccf573a..398dbe7f5c 100644
--- a/testsuites/samples/loopback/init.c
+++ b/testsuites/samples/loopback/init.c
@@ -1,3 +1,9 @@
+/*
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c
index 584bd5b4ea..77cef53348 100644
--- a/testsuites/samples/minimum/init.c
+++ b/testsuites/samples/minimum/init.c
@@ -1,6 +1,11 @@
-/* Minimum Size Application Initialization
+/**
+ * @file
*
- * COPYRIGHT (c) 1989-2008.
+ * Minimum Size Application Initialization
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,6 +22,9 @@
#include <bsp.h>
#include <rtems/score/thread.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/samples/nsecs/init.c b/testsuites/samples/nsecs/init.c
index 3142bffe23..f94c672d0c 100644
--- a/testsuites/samples/nsecs/init.c
+++ b/testsuites/samples/nsecs/init.c
@@ -1,8 +1,11 @@
-/*
+/**
+ * @file
+ *
* Nanoseconds accuracy timestamp test
*/
-/* COPYRIGHT (c) 1989-2011.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
diff --git a/testsuites/samples/paranoia/init.c b/testsuites/samples/paranoia/init.c
index 9feb3d4526..bd23c33c0e 100644
--- a/testsuites/samples/paranoia/init.c
+++ b/testsuites/samples/paranoia/init.c
@@ -1,16 +1,5 @@
-/* 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.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
diff --git a/testsuites/samples/paranoia/paranoia.c b/testsuites/samples/paranoia/paranoia.c
index 2620ca7226..400063167a 100644
--- a/testsuites/samples/paranoia/paranoia.c
+++ b/testsuites/samples/paranoia/paranoia.c
@@ -1471,7 +1471,7 @@ or 1/3 and 3/9 and 9/27 may disagree");
if ((CInvrse * Q) != ((CInvrse * Y) * S)) {
UfThold = Y;
BadCond (Failure, "Either accuracy deteriorates as numbers\n");
- printf ("approach a threshold = %.17e\n", UfThold);;
+ 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");
}
@@ -1526,7 +1526,7 @@ or 1/3 and 3/9 and 9/27 may disagree");
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 ("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");
diff --git a/testsuites/samples/pppd/init.c b/testsuites/samples/pppd/init.c
index a11f07b0e2..4519ad64aa 100644
--- a/testsuites/samples/pppd/init.c
+++ b/testsuites/samples/pppd/init.c
@@ -1,8 +1,16 @@
+/*
+ * COPYRIGHT (c) 1989-2012.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c
index ca3442ea5e..d9366f8fa0 100644
--- a/testsuites/samples/ticker/init.c
+++ b/testsuites/samples/ticker/init.c
@@ -1,16 +1,5 @@
-/* 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-2011.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c
index 29446b6650..a4eb1676bc 100644
--- a/testsuites/samples/unlimited/init.c
+++ b/testsuites/samples/unlimited/init.c
@@ -1,20 +1,9 @@
-/* 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.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may in
- * the file LICENSE in this distribution or at
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
diff --git a/testsuites/sptests/sp08/init.c b/testsuites/sptests/sp08/init.c
index e4206b081d..48ec913f68 100644
--- a/testsuites/sptests/sp08/init.c
+++ b/testsuites/sptests/sp08/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define PRIxModes_Control PRIx32
#define PRIxrtems_mode PRIxModes_Control
diff --git a/testsuites/sptests/sp10/init.c b/testsuites/sptests/sp10/init.c
index e71e66618b..547fd1fd4d 100644
--- a/testsuites/sptests/sp10/init.c
+++ b/testsuites/sptests/sp10/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp18/init.c b/testsuites/sptests/sp18/init.c
index eb84ecfd36..dc3f9f0c14 100644
--- a/testsuites/sptests/sp18/init.c
+++ b/testsuites/sptests/sp18/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp2038/init.c b/testsuites/sptests/sp2038/init.c
index 897aaf6da9..e0179e99a3 100644
--- a/testsuites/sptests/sp2038/init.c
+++ b/testsuites/sptests/sp2038/init.c
@@ -23,6 +23,9 @@
#include <rtems.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define TEST_APPLICABLE \
(CPU_TIMESTAMP_USE_INT64 == TRUE || CPU_TIMESTAMP_USE_INT64_INLINE == TRUE)
diff --git a/testsuites/sptests/sp21/init.c b/testsuites/sptests/sp21/init.c
index fefbfbc22c..84daaaddb5 100644
--- a/testsuites/sptests/sp21/init.c
+++ b/testsuites/sptests/sp21/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,12 @@
#include <rtems/devzero.h>
#include <rtems/libio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void do_test_io_manager(void);
+void do_test_io_lookup_name(void);
+void do_test_zero_driver(void);
+
#define PRIurtems_device_major_number PRIu32
#define STUB_DRIVER_MAJOR 0x2
diff --git a/testsuites/sptests/sp27/init.c b/testsuites/sptests/sp27/init.c
index ffd202743e..9935f31e85 100644
--- a/testsuites/sptests/sp27/init.c
+++ b/testsuites/sptests/sp27/init.c
@@ -1,7 +1,7 @@
/*
* Test for rtems_semaphore_flush
*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,12 +16,15 @@
#include <bsp.h>
#include <tmacros.h>
-void starttask(int arg);
-rtems_task subtask(rtems_task_argument arg);
-
#include <stdio.h>
#include <stdlib.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void starttask(int arg);
+rtems_task subtask(rtems_task_argument arg);
+void doTest(void);
+
#define NTASK 4
#if defined(USE_COUNTING_SEMAPHORE)
diff --git a/testsuites/sptests/sp28/init.c b/testsuites/sptests/sp28/init.c
index 5a564f9a53..bc24f35af4 100644
--- a/testsuites/sptests/sp28/init.c
+++ b/testsuites/sptests/sp28/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,6 +17,8 @@
#include <rtems/error.h>
#include <stdio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
rtems_task subtask(rtems_task_argument arg);
rtems_task Task_variable_deleter(rtems_task_argument ignored);
void starttask(int arg);
diff --git a/testsuites/sptests/sp32/init.c b/testsuites/sptests/sp32/init.c
index 5a301c06d8..43f9f1ddf8 100644
--- a/testsuites/sptests/sp32/init.c
+++ b/testsuites/sptests/sp32/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h> /* includes bsp.h, stdio, etc... */
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
) {
diff --git a/testsuites/sptests/sp40/init.c b/testsuites/sptests/sp40/init.c
index 2f88d9c344..c16fd585e5 100644
--- a/testsuites/sptests/sp40/init.c
+++ b/testsuites/sptests/sp40/init.c
@@ -1,7 +1,7 @@
/*
* IO Manager Dynamic Registration
*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* Copyright (c) 2009 embedded brains GmbH.
@@ -19,6 +19,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
static rtems_device_driver test_open(
rtems_device_major_number minor,
rtems_device_minor_number major,
diff --git a/testsuites/sptests/sp41/init.c b/testsuites/sptests/sp41/init.c
index 3c4c0b1803..cadf7d58b6 100644
--- a/testsuites/sptests/sp41/init.c
+++ b/testsuites/sptests/sp41/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,10 @@
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void iterator(Thread_Control *thread);
+
void iterator(
Thread_Control *thread
)
diff --git a/testsuites/sptests/sp49/init.c b/testsuites/sptests/sp49/init.c
index d897eadabb..e07458c2aa 100644
--- a/testsuites/sptests/sp49/init.c
+++ b/testsuites/sptests/sp49/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(rtems_task_argument ignored)
{
rtems_status_code sc;
diff --git a/testsuites/sptests/sp50/init.c b/testsuites/sptests/sp50/init.c
index f19aa25f70..61f863277b 100644
--- a/testsuites/sptests/sp50/init.c
+++ b/testsuites/sptests/sp50/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,10 +14,14 @@
#include <tmacros.h>
#include "pritime.h"
+/* forward declarations to avoid warnings */
+rtems_timer_service_routine Timer_Routine(rtems_id id, void *ignored);
+rtems_task Init(rtems_task_argument argument);
+
volatile int Fired;
volatile bool timerRan;
-rtems_timer_service_routine Timer_Routine( rtems_id id, void *ignored )
+rtems_timer_service_routine Timer_Routine(rtems_id id, void *ignored)
{
rtems_status_code status;
diff --git a/testsuites/sptests/sp51/init.c b/testsuites/sptests/sp51/init.c
index 697e095f96..abc93cc4c3 100644
--- a/testsuites/sptests/sp51/init.c
+++ b/testsuites/sptests/sp51/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sp52/init.c b/testsuites/sptests/sp52/init.c
index 71a280f38d..b95fdce981 100644
--- a/testsuites/sptests/sp52/init.c
+++ b/testsuites/sptests/sp52/init.c
@@ -27,6 +27,13 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine TIMER_service_routine(
+ rtems_id ignored_id,
+ void *user_data
+);
+
#define INITIAL_SECOND 10
volatile bool _timer_passage = FALSE;
diff --git a/testsuites/sptests/sp54/init.c b/testsuites/sptests/sp54/init.c
index ecf66a2f5d..8183fa7712 100644
--- a/testsuites/sptests/sp54/init.c
+++ b/testsuites/sptests/sp54/init.c
@@ -1,7 +1,12 @@
-/* Odd Id Cases where API configured but No Threads
- * + Possibly Valid Id passed to directive
+/**
+ * @@file
*
- * COPYRIGHT (c) 1989-2011.
+ * Odd Id Cases where API configured but No Threads
+ * + Possibly Valid Id passed to directive
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +20,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp55/init.c b/testsuites/sptests/sp55/init.c
index 9ad14f2c02..5ba31e04b4 100644
--- a/testsuites/sptests/sp55/init.c
+++ b/testsuites/sptests/sp55/init.c
@@ -1,6 +1,11 @@
-/* Broadcast to a message queue with pending messages
+/**
+ * @file
*
- * COPYRIGHT (c) 1989-2009.
+ * Broadcast to a message queue with pending messages
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +19,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp56/init.c b/testsuites/sptests/sp56/init.c
index 4af621748c..d41d96a88e 100644
--- a/testsuites/sptests/sp56/init.c
+++ b/testsuites/sptests/sp56/init.c
@@ -1,6 +1,11 @@
-/* Extension create fails
+/**
+ * @file
*
- * COPYRIGHT (c) 1989-2009.
+ * Extension create fails
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +19,10 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+bool task_create(Thread_Control *executing, Thread_Control *created);
+
bool task_create(
Thread_Control *executing,
Thread_Control *created
diff --git a/testsuites/sptests/sp57/init.c b/testsuites/sptests/sp57/init.c
index a616d02b37..c7827d8e2c 100644
--- a/testsuites/sptests/sp57/init.c
+++ b/testsuites/sptests/sp57/init.c
@@ -1,6 +1,11 @@
-/* Restart a task which is delaying
+/*
+ * @file
*
- * COPYRIGHT (c) 1989-2011.
+ * Restart a task which is delaying
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +19,10 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Delay_task(rtems_task_argument ignored);
+
rtems_task Delay_task(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp58/init.c b/testsuites/sptests/sp58/init.c
index a16472baab..3d16b60d6b 100644
--- a/testsuites/sptests/sp58/init.c
+++ b/testsuites/sptests/sp58/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,6 +17,11 @@
#include <rtems/score/timespec.h>
#include <rtems/score/threadq.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void timespec_divide_by_zero(void);
+void timespec_greater_than_lhs_sec_less(void);
+
void timespec_divide_by_zero(void)
{
struct timespec t1;
diff --git a/testsuites/sptests/sp59/init.c b/testsuites/sptests/sp59/init.c
index 966eaa0a2c..d03c83630d 100644
--- a/testsuites/sptests/sp59/init.c
+++ b/testsuites/sptests/sp59/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,10 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Blocking_task(rtems_task_argument ignored);
+
#define ALLOC_SIZE 400
uint8_t Region_Memory[512] CPU_STRUCTURE_ALIGNMENT;
rtems_id Region;
diff --git a/testsuites/sptests/sp60/init.c b/testsuites/sptests/sp60/init.c
index c823350ee8..9762e9cc7e 100644
--- a/testsuites/sptests/sp60/init.c
+++ b/testsuites/sptests/sp60/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp62/init.c b/testsuites/sptests/sp62/init.c
index 1f2033bb60..592458679f 100644
--- a/testsuites/sptests/sp62/init.c
+++ b/testsuites/sptests/sp62/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,10 @@
#include <tmacros.h>
#include <unistd.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Blocker(rtems_task_argument ignored);
+
rtems_id Region;
uint32_t Region_Memory[256] CPU_STRUCTURE_ALIGNMENT;
volatile bool case_hit;
diff --git a/testsuites/sptests/sp63/init.c b/testsuites/sptests/sp63/init.c
index fcbde5c2bb..040f510d75 100644
--- a/testsuites/sptests/sp63/init.c
+++ b/testsuites/sptests/sp63/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,12 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void test_case_one(void);
+void test_case_two(void);
+void test_case_three(void);
+
#define MAX 256
uint32_t Memory[MAX];
Heap_Control Heap;
diff --git a/testsuites/sptests/sp64/init.c b/testsuites/sptests/sp64/init.c
index fa3e3a8edc..42b9c4581d 100644
--- a/testsuites/sptests/sp64/init.c
+++ b/testsuites/sptests/sp64/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include "tmacros.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
uint32_t Area1[50] CPU_STRUCTURE_ALIGNMENT;
uint32_t Area2[50] CPU_STRUCTURE_ALIGNMENT;
diff --git a/testsuites/sptests/sp65/init.c b/testsuites/sptests/sp65/init.c
index d633f5cf3d..046ceb620e 100644
--- a/testsuites/sptests/sp65/init.c
+++ b/testsuites/sptests/sp65/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,10 @@
#include <tmacros.h>
#include <unistd.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Task_1(rtems_task_argument arg);
+
#if defined(INHERIT_CEILING)
#define TEST_NAME "66"
#define TASK_PRIORITY 2
@@ -22,10 +26,6 @@
#define TASK_PRIORITY 1
#endif
-rtems_task Task_1(
- rtems_task_argument arg
-);
-
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sp67/init.c b/testsuites/sptests/sp67/init.c
index 6a8fdea341..60f6c7bc39 100644
--- a/testsuites/sptests/sp67/init.c
+++ b/testsuites/sptests/sp67/init.c
@@ -16,6 +16,13 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine TIMER_service_routine(
+ rtems_id ignored_id,
+ void *user_data
+);
+
/*
* We have to extern this rather than use __RTEMS_VIOLATE_KERNEL_VISIBILITY__
* because this variable isn't actually in any .h.
diff --git a/testsuites/sptests/sp68/init.c b/testsuites/sptests/sp68/init.c
index b212402134..03401293db 100644
--- a/testsuites/sptests/sp68/init.c
+++ b/testsuites/sptests/sp68/init.c
@@ -25,6 +25,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define TIMER_COUNT 6
#define OBTAIN 0
diff --git a/testsuites/sptests/sp69/init.c b/testsuites/sptests/sp69/init.c
index 5e1cc43c3a..a886929457 100644
--- a/testsuites/sptests/sp69/init.c
+++ b/testsuites/sptests/sp69/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,9 @@
#include <tmacros.h>
#include "test_support.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sp70/init.c b/testsuites/sptests/sp70/init.c
index 67980ea1fa..2d774b18a9 100644
--- a/testsuites/sptests/sp70/init.c
+++ b/testsuites/sptests/sp70/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,11 @@
#include <tmacros.h>
#include "test_support.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void create_helper(int task);
+void delete_helper(int task);
+
rtems_id TaskID[10];
void create_helper(int task)
@@ -32,7 +37,7 @@ void create_helper(int task)
directive_failed( status, "rtems_task_create" );
}
-void delete_helper( int task )
+void delete_helper(int task)
{
rtems_status_code status;
diff --git a/testsuites/sptests/sp71/init.c b/testsuites/sptests/sp71/init.c
index b330e89ffb..10c339ead7 100644
--- a/testsuites/sptests/sp71/init.c
+++ b/testsuites/sptests/sp71/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,9 @@
#define PER_ALLOCATION 8000
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sp72/init.c b/testsuites/sptests/sp72/init.c
index d2e0f5557c..492aa5d03b 100644
--- a/testsuites/sptests/sp72/init.c
+++ b/testsuites/sptests/sp72/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,10 @@
#include <tmacros.h>
#include "test_support.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Test_task(rtems_task_argument argument);
+
rtems_id Semaphore_id;
rtems_task Test_task(
diff --git a/testsuites/sptests/sp73/init.c b/testsuites/sptests/sp73/init.c
index 39fbe73371..3b5aba3e44 100644
--- a/testsuites/sptests/sp73/init.c
+++ b/testsuites/sptests/sp73/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,10 @@
#include <inttypes.h>
#include "tmacros.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Test_task(rtems_task_argument argument);
+
rtems_id Task_id[ 4 ]; /* array of task ids */
rtems_name Task_name[ 4 ]; /* array of task names */
diff --git a/testsuites/sptests/sp74/init.c b/testsuites/sptests/sp74/init.c
index 7661932be6..a6720dc7ac 100644
--- a/testsuites/sptests/sp74/init.c
+++ b/testsuites/sptests/sp74/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Test_task(rtems_task_argument argument);
rtems_task Test_task(
rtems_task_argument index
diff --git a/testsuites/sptests/sp75/init.c b/testsuites/sptests/sp75/init.c
index 4b4a0b67ef..95ba2e0833 100644
--- a/testsuites/sptests/sp75/init.c
+++ b/testsuites/sptests/sp75/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,9 @@
#include <tmacros.h>
#include "test_support.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sp76/init.c b/testsuites/sptests/sp76/init.c
index 53788f89ed..e9c5304560 100644
--- a/testsuites/sptests/sp76/init.c
+++ b/testsuites/sptests/sp76/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,10 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Test_task(rtems_task_argument index);
+
rtems_task Test_task(
rtems_task_argument index
)
diff --git a/testsuites/sptests/spassoc01/init.c b/testsuites/sptests/spassoc01/init.c
index c61bbc8235..4a5f80c441 100644
--- a/testsuites/sptests/spassoc01/init.c
+++ b/testsuites/sptests/spassoc01/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,6 +17,9 @@
#include <stdio.h>
#include <rtems/assoc.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
const rtems_assoc_t assoc_table_null[] =
{
{ NULL , 0 , 0 },
diff --git a/testsuites/sptests/spcbssched03/tasks_periodic.c b/testsuites/sptests/spcbssched03/tasks_periodic.c
index 684ecc8515..74d879d073 100644
--- a/testsuites/sptests/spcbssched03/tasks_periodic.c
+++ b/testsuites/sptests/spcbssched03/tasks_periodic.c
@@ -19,7 +19,10 @@
#include "system.h"
-void overrun_handler_task_4 (
+/* forward declarations to avoid warnings */
+void overrun_handler_task_4(rtems_cbs_server_id server_id);
+
+void overrun_handler_task_4(
rtems_cbs_server_id server_id
)
{
diff --git a/testsuites/sptests/spchain/init.c b/testsuites/sptests/spchain/init.c
index 129d5a47c0..00e2d778b6 100644
--- a/testsuites/sptests/spchain/init.c
+++ b/testsuites/sptests/spchain/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,9 @@
#include <tmacros.h>
#include <rtems/chain.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define EVENT RTEMS_EVENT_13
#define TIMEOUT 1
diff --git a/testsuites/sptests/spclockget/init.c b/testsuites/sptests/spclockget/init.c
index d828f1d6af..9776a6e4d7 100644
--- a/testsuites/sptests/spclockget/init.c
+++ b/testsuites/sptests/spclockget/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,9 @@
#include <tmacros.h>
#include "pritime.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/spcoverage/init.c b/testsuites/sptests/spcoverage/init.c
index 850604028d..2ac51f10f7 100644
--- a/testsuites/sptests/spcoverage/init.c
+++ b/testsuites/sptests/spcoverage/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,9 @@
#include "tmacros.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/sperror01/init.c b/testsuites/sptests/sperror01/init.c
index 3b6195f020..36e16b11fc 100644
--- a/testsuites/sptests/sperror01/init.c
+++ b/testsuites/sptests/sperror01/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,9 @@
#include "rtems/error.h"
#include <errno.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sperror02/init.c b/testsuites/sptests/sperror02/init.c
index c05856686d..02f9e79f44 100644
--- a/testsuites/sptests/sperror02/init.c
+++ b/testsuites/sptests/sperror02/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,9 @@
#include <errno.h>
#include <rtems/error.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/sperror03/init.c b/testsuites/sptests/sperror03/init.c
index 373f76b35a..0b7533707c 100644
--- a/testsuites/sptests/sperror03/init.c
+++ b/testsuites/sptests/sperror03/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,9 @@
#include <tmacros.h>
#include "test_support.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/spfatal21/testcase.h b/testsuites/sptests/spfatal21/testcase.h
index 80f7fca618..788f06be5e 100644
--- a/testsuites/sptests/spfatal21/testcase.h
+++ b/testsuites/sptests/spfatal21/testcase.h
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,7 @@
#include <rtems/libcsupport.h>
#include <rtems/malloc.h>
+#include <unistd.h>
/* Safe information on real heap */
extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers;
diff --git a/testsuites/sptests/spfatal_support/consume_sems.c b/testsuites/sptests/spfatal_support/consume_sems.c
index 5024eb666e..adb1901046 100644
--- a/testsuites/sptests/spfatal_support/consume_sems.c
+++ b/testsuites/sptests/spfatal_support/consume_sems.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,6 +13,13 @@
#include <rtems.h>
+/* forward declarations to avoid warnings */
+rtems_device_driver consume_semaphores_initialize(
+ rtems_device_major_number major __attribute__((unused)),
+ rtems_device_minor_number minor __attribute__((unused)),
+ void *pargp __attribute__((unused))
+);
+
#define MAXIMUM 20
rtems_id Semaphores[MAXIMUM];
diff --git a/testsuites/sptests/spfifo01/init.c b/testsuites/sptests/spfifo01/init.c
index e0aa442801..e01204ede1 100644
--- a/testsuites/sptests/spfifo01/init.c
+++ b/testsuites/sptests/spfifo01/init.c
@@ -19,6 +19,9 @@
#include "tmacros.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define FIFO_PATH "/fifo01"
static void test_main(void)
diff --git a/testsuites/sptests/spfifo02/init.c b/testsuites/sptests/spfifo02/init.c
index 985f1bb52d..33c1a7910c 100644
--- a/testsuites/sptests/spfifo02/init.c
+++ b/testsuites/sptests/spfifo02/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -21,6 +21,15 @@
#include <errno.h>
#include <rtems/libcsupport.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void create_all_barriers(void);
+void create_all_semaphores(void);
+void delete_barrier(void);
+void delete_semaphore(void);
+void create_fifo(void);
+void open_fifo(int expected, int flags);
+
#define MAXIMUM 10
#define NUM_OPEN_REQ 26
diff --git a/testsuites/sptests/spfifo03/init.c b/testsuites/sptests/spfifo03/init.c
index 2c3fb1ac26..143bed8d97 100644
--- a/testsuites/sptests/spfifo03/init.c
+++ b/testsuites/sptests/spfifo03/init.c
@@ -1,15 +1,5 @@
-/* Init
- *
- * This routine is the initialization task for this test program.
- * It is a user initialization task and has the responsibility
- * of invoking the test routine
- *
- * Input parameters:
- * not_used
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
+/*
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -33,6 +23,11 @@
#include <rtems.h>
#include <rtems/libio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task read_task(rtems_task_argument not_used);
+void test_main(void);
+
#define SEND_RCV_BUFSIZ 12
rtems_id Barrier;
@@ -91,8 +86,7 @@ rtems_task read_task(rtems_task_argument not_used)
rtems_task_delete( RTEMS_SELF );
}
-
-void test_main(void) //Also acts as the write task
+void test_main(void) /* Also acts as the write task */
{
rtems_id readTaskID;
diff --git a/testsuites/sptests/spfifo04/init.c b/testsuites/sptests/spfifo04/init.c
index d20778cf33..e8f11c860d 100644
--- a/testsuites/sptests/spfifo04/init.c
+++ b/testsuites/sptests/spfifo04/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -23,6 +23,9 @@
#include <rtems.h>
#include <rtems/libio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define SEND_RCV_BUFSIZ 12
rtems_task Init(
diff --git a/testsuites/sptests/spfifo05/init.c b/testsuites/sptests/spfifo05/init.c
index 81ca4a474f..b9048de316 100644
--- a/testsuites/sptests/spfifo05/init.c
+++ b/testsuites/sptests/spfifo05/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -24,6 +24,10 @@
#include <rtems.h>
#include <rtems/libio.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task read_task(rtems_task_argument not_used);
+
#define SEND_RCV_BUFSIZ (PIPE_BUF+20)
rtems_id rBarrier;
@@ -32,7 +36,7 @@ rtems_id wBarrier;
char recvBuf[SEND_RCV_BUFSIZ] = {0};
char sendBuf[SEND_RCV_BUFSIZ] = {0};
-rtems_task read_task( rtems_task_argument not_used )
+rtems_task read_task(rtems_task_argument not_used)
{
int fd = 0;
int status = -1;
@@ -117,8 +121,6 @@ rtems_task read_task( rtems_task_argument not_used )
rtems_task_delete( RTEMS_SELF );
}
-
-
rtems_task Init(
rtems_task_argument not_used
)
diff --git a/testsuites/sptests/spintrcritical01/init.c b/testsuites/sptests/spintrcritical01/init.c
index 6276c9bc81..7859a14a0e 100644
--- a/testsuites/sptests/spintrcritical01/init.c
+++ b/testsuites/sptests/spintrcritical01/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,11 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+Thread_blocking_operation_States getState(void);
+
#if defined(FIFO_NO_TIMEOUT)
#define TEST_NAME "01"
#define TEST_STRING "FIFO/Without Timeout"
diff --git a/testsuites/sptests/spintrcritical06/init.c b/testsuites/sptests/spintrcritical06/init.c
index 408d9d95f6..d1cbe4da8b 100644
--- a/testsuites/sptests/spintrcritical06/init.c
+++ b/testsuites/sptests/spintrcritical06/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,11 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+rtems_task Secondary_task(rtems_task_argument arg);
+
/* common parameters */
#define SEMAPHORE_ATTRIBUTES RTEMS_PRIORITY
diff --git a/testsuites/sptests/spintrcritical08/init.c b/testsuites/sptests/spintrcritical08/init.c
index a0be34ec3b..534cd06e1c 100644
--- a/testsuites/sptests/spintrcritical08/init.c
+++ b/testsuites/sptests/spintrcritical08/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,11 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+rtems_rate_monotonic_period_states getState(void);
+
rtems_id Main_task;
rtems_id Period;
volatile bool case_hit;
diff --git a/testsuites/sptests/spintrcritical09/init.c b/testsuites/sptests/spintrcritical09/init.c
index 28d31fd9f8..c953799f0a 100644
--- a/testsuites/sptests/spintrcritical09/init.c
+++ b/testsuites/sptests/spintrcritical09/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,11 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+Thread_blocking_operation_States getState(void);
+
rtems_id Main_task;
rtems_id Semaphore;
volatile bool case_hit;
diff --git a/testsuites/sptests/spintrcritical10/init.c b/testsuites/sptests/spintrcritical10/init.c
index 069d444955..66306cd966 100644
--- a/testsuites/sptests/spintrcritical10/init.c
+++ b/testsuites/sptests/spintrcritical10/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -15,6 +15,9 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_id Main_task;
rtems_task Init(
diff --git a/testsuites/sptests/spintrcritical11/init.c b/testsuites/sptests/spintrcritical11/init.c
index 4ade156e89..78226f32b3 100644
--- a/testsuites/sptests/spintrcritical11/init.c
+++ b/testsuites/sptests/spintrcritical11/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -14,6 +14,10 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+
rtems_id Main_task;
#if defined(EVENT_ANY)
diff --git a/testsuites/sptests/spintrcritical13/init.c b/testsuites/sptests/spintrcritical13/init.c
index 7cf1bcc3a7..c12b015909 100644
--- a/testsuites/sptests/spintrcritical13/init.c
+++ b/testsuites/sptests/spintrcritical13/init.c
@@ -26,9 +26,13 @@
#else
#error "Test Mode not defined"
-
#endif
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+rtems_timer_service_routine TimerMethod(rtems_id timer, void *arg);
+
rtems_id Main_task;
rtems_id Timer;
diff --git a/testsuites/sptests/spintrcritical15/init.c b/testsuites/sptests/spintrcritical15/init.c
index ec535ccbfd..18491def08 100644
--- a/testsuites/sptests/spintrcritical15/init.c
+++ b/testsuites/sptests/spintrcritical15/init.c
@@ -14,6 +14,10 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Secondary_task(rtems_task_argument ignored);
+
#define TEST_NAME "15"
#define INIT_PRIORITY 2
#define BLOCKER_PRIORITY 1
@@ -29,7 +33,6 @@ rtems_task Secondary_task(
rtems_status_code sc;
while (1) {
-
sc = rtems_semaphore_obtain( Semaphore, RTEMS_DEFAULT_OPTIONS, 1 );
fatal_directive_status( sc, RTEMS_TIMEOUT, "rtems_semaphore_obtain" );
}
diff --git a/testsuites/sptests/spintrcritical16/init.c b/testsuites/sptests/spintrcritical16/init.c
index ab6f3a4f26..396445509d 100644
--- a/testsuites/sptests/spintrcritical16/init.c
+++ b/testsuites/sptests/spintrcritical16/init.c
@@ -15,6 +15,11 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
+Thread_blocking_operation_States getState(void);
+
#define TEST_NAME "16"
Thread_Control *Main_TCB;
diff --git a/testsuites/sptests/spintrcritical17/init.c b/testsuites/sptests/spintrcritical17/init.c
index bbcfea47b3..91d7b8de2e 100644
--- a/testsuites/sptests/spintrcritical17/init.c
+++ b/testsuites/sptests/spintrcritical17/init.c
@@ -18,6 +18,9 @@
#include <tmacros.h>
#include <intrcritical.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define TIMER_COUNT 4
#define TIMER_TRIGGER 0
diff --git a/testsuites/sptests/spmountmgr01/init.c b/testsuites/sptests/spmountmgr01/init.c
index ba0fdbd1ce..01308a58a3 100644
--- a/testsuites/sptests/spmountmgr01/init.c
+++ b/testsuites/sptests/spmountmgr01/init.c
@@ -17,8 +17,17 @@
#include <rtems/libio_.h>
#include <rtems/libcsupport.h>
-int fs_mount( rtems_filesystem_mount_table_entry_t *mt_entry,
- const void *data )
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+int fs_mount(
+ rtems_filesystem_mount_table_entry_t *mt_entry,
+ const void *data
+);
+
+int fs_mount(
+ rtems_filesystem_mount_table_entry_t *mt_entry,
+ const void *data
+)
{
return 0;
}
@@ -29,7 +38,7 @@ rtems_task Init(
{
int status = 0;
void *alloc_ptr = (void *)0;
-
+
puts( "\n\n*** TEST MOUNT MANAGER ROUTINE - 01 ***" );
puts( "Init - allocating most of heap -- OK" );
@@ -50,25 +59,24 @@ rtems_task Init(
puts( "Init - attempt to make target(NULL) and mount - expect EINVAL" );
status = mount_and_make_target_path(
- NULL,
- NULL,
- "fs",
- 0,
- NULL );
+ NULL,
+ NULL,
+ "fs",
+ 0,
+ NULL );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
puts( "Init - attempt to make target and mount - expect EINVAL" );
status = mount_and_make_target_path(
- NULL,
- "/tmp",
- "fs",
- 2,
- NULL );
+ NULL,
+ "/tmp",
+ "fs",
+ 2,
+ NULL );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
-
puts( "Init - register filesystem fs - expect EINVAL" );
status = rtems_filesystem_register( "fs", fs_mount );
rtems_test_assert( status == -1 );
@@ -82,7 +90,7 @@ rtems_task Init(
status = rtems_filesystem_register( "bfs", fs_mount );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
-
+
puts( "Init - attempt to unregister with bad args - expect EINVAL" );
status = rtems_filesystem_unregister( NULL );
rtems_test_assert( status == -1 );
@@ -91,7 +99,7 @@ rtems_task Init(
puts( "Init - attempt to unregister fs -- OK" );
status = rtems_filesystem_unregister( "fs" );
rtems_test_assert( status == 0 );
-
+
puts( "Init - attempt to unregister fs again - expect ENOENT" );
status = rtems_filesystem_unregister( "fs" );
rtems_test_assert( status == -1 );
@@ -100,7 +108,7 @@ rtems_task Init(
puts( "Init - attempt to unregister bfs -- OK" );
status = rtems_filesystem_unregister( "bfs" );
rtems_test_assert( status == 0 );
-
+
puts( "Init - attempt to unregister bfs again - expect ENOENT" );
status = rtems_filesystem_unregister( "bfs" );
rtems_test_assert( status == -1 );
diff --git a/testsuites/sptests/spnotepad01/init.c b/testsuites/sptests/spnotepad01/init.c
index b01b525397..464d4ef9d7 100644
--- a/testsuites/sptests/spnotepad01/init.c
+++ b/testsuites/sptests/spnotepad01/init.c
@@ -13,6 +13,9 @@
#include "tmacros.h"
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c
index 7b922f7709..e81212d88b 100644
--- a/testsuites/sptests/spprintk/init.c
+++ b/testsuites/sptests/spprintk/init.c
@@ -16,6 +16,13 @@
#include <tmacros.h>
#include <rtems/bspIo.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+int test_getchar(void);
+void do_getchark(void);
+void do_putk(void);
+void do_printk(void);
+
int test_getchar(void)
{
return 0x35;
diff --git a/testsuites/sptests/spprivenv01/init.c b/testsuites/sptests/spprivenv01/init.c
index fb0c1a4f51..609f85cae5 100644
--- a/testsuites/sptests/spprivenv01/init.c
+++ b/testsuites/sptests/spprivenv01/init.c
@@ -17,7 +17,11 @@
#include <rtems/malloc.h>
#include <rtems/libcsupport.h>
-rtems_task task_routine( rtems_task_argument not_used )
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task task_routine(rtems_task_argument not_used);
+
+rtems_task task_routine(rtems_task_argument not_used)
{
rtems_status_code sc;
@@ -39,8 +43,7 @@ rtems_task Init(
rtems_id current_task_id;
rtems_id task_id;
rtems_name another_task_name;
- Heap_Information_block Info;
-
+
puts( "\n\n*** TEST USER ENVIRONMENT ROUTINE - 01 ***" );
puts( "Init - allocating most of heap -- OK" );
diff --git a/testsuites/sptests/sprbtree01/init.c b/testsuites/sptests/sprbtree01/init.c
index f94a01030e..defd1bde91 100644
--- a/testsuites/sptests/sprbtree01/init.c
+++ b/testsuites/sptests/sprbtree01/init.c
@@ -13,6 +13,9 @@
#include <tmacros.h>
#include <rtems/rbtree.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
int numbers[20] = {
52, 99, 0, 85, 43, 44, 10, 60, 50, 19, 8, 68, 48, 57, 17, 67, 90, 12, 77, 71};
diff --git a/testsuites/sptests/spsimplesched01/init.c b/testsuites/sptests/spsimplesched01/init.c
index 0fd06ab6e2..4e34cb2044 100644
--- a/testsuites/sptests/spsimplesched01/init.c
+++ b/testsuites/sptests/spsimplesched01/init.c
@@ -13,6 +13,10 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Test_task(rtems_task_argument unused);
+
/*
* Keep the names and IDs in global variables so another task can use them.
*/
diff --git a/testsuites/sptests/spsimplesched02/init.c b/testsuites/sptests/spsimplesched02/init.c
index 9da34bc915..8b053b6917 100644
--- a/testsuites/sptests/spsimplesched02/init.c
+++ b/testsuites/sptests/spsimplesched02/init.c
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT (c) 2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -13,6 +13,11 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+rtems_task Test_task(rtems_task_argument argument);
+void ObtainRelease(bool suspendIdle);
+
/*
* Keep the names and IDs in global variables so another task can use them.
*/
@@ -37,7 +42,7 @@ rtems_task Test_task(
}
}
-void ObtainRelease( bool suspendIdle )
+void ObtainRelease( bool suspendIdle )
{
rtems_status_code status;
@@ -128,7 +133,7 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_MAXIMUM_TASKS 3
+#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_SEMAPHORES 2
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/sptests/spsimplesched03/init.c b/testsuites/sptests/spsimplesched03/init.c
index e189bcf7be..ac1991b2e2 100644
--- a/testsuites/sptests/spsimplesched03/init.c
+++ b/testsuites/sptests/spsimplesched03/init.c
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
rtems_task Init(
rtems_task_argument argument
)
diff --git a/testsuites/sptests/spstkalloc/init.c b/testsuites/sptests/spstkalloc/init.c
index ea71819ab6..e4d203f4ff 100644
--- a/testsuites/sptests/spstkalloc/init.c
+++ b/testsuites/sptests/spstkalloc/init.c
@@ -13,6 +13,9 @@
#include <tmacros.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
#define MAXIMUM_STACKS 3
typedef struct {
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 48124849e6..e03efe6f06 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -16,6 +16,13 @@
#include <sys/types.h>
#include <rtems/score/threadq.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+void threadq_first_empty(
+ const char *discipline_string,
+ Thread_queue_Disciplines discipline
+);
+
void threadq_first_empty(
const char *discipline_string,
Thread_queue_Disciplines discipline
diff --git a/testsuites/sptests/spwkspace/init.c b/testsuites/sptests/spwkspace/init.c
index 52c1fde0fa..5d5fbabdcc 100644
--- a/testsuites/sptests/spwkspace/init.c
+++ b/testsuites/sptests/spwkspace/init.c
@@ -19,6 +19,9 @@
#include <rtems/score/wkspace.h>
+/* forward declarations to avoid warnings */
+rtems_task Init(rtems_task_argument argument);
+
static void test_workspace_string_duplicate(void)
{
char a [] = "abcd";