summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeiY <wei.a.yang@gmail.com>2013-08-01 21:49:49 +0800
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-01 16:48:25 +0200
commit693088951db029f92eb02f0f8a49fc9576ca0fab (patch)
tree53f7cd00fcf185668bb42137e760a13e49d67560
parentscore: Use an ISR lock for TOD (diff)
downloadrtems-693088951db029f92eb02f0f8a49fc9576ca0fab.tar.bz2
clean up spatomic testcase
-rw-r--r--testsuites/sptests/Makefile.am4
-rw-r--r--testsuites/sptests/configure.ac11
-rw-r--r--testsuites/sptests/spatomic01/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic01/init.c63
-rw-r--r--testsuites/sptests/spatomic01/spatomic01.doc23
-rw-r--r--testsuites/sptests/spatomic01/spatomic01.scn70
-rw-r--r--testsuites/sptests/spatomic01/system.h51
-rw-r--r--testsuites/sptests/spatomic01/tasks.c93
-rw-r--r--testsuites/sptests/spatomic02/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic02/init.c68
-rw-r--r--testsuites/sptests/spatomic02/spatomic02.doc23
-rw-r--r--testsuites/sptests/spatomic02/spatomic02.scn70
-rw-r--r--testsuites/sptests/spatomic02/system.h51
-rw-r--r--testsuites/sptests/spatomic02/tasks.c94
-rw-r--r--testsuites/sptests/spatomic03/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic03/init.c68
-rw-r--r--testsuites/sptests/spatomic03/spatomic03.doc23
-rw-r--r--testsuites/sptests/spatomic03/spatomic03.scn102
-rw-r--r--testsuites/sptests/spatomic03/system.h51
-rw-r--r--testsuites/sptests/spatomic03/tasks.c102
-rw-r--r--testsuites/sptests/spatomic04/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic04/init.c68
-rw-r--r--testsuites/sptests/spatomic04/spatomic04.doc23
-rw-r--r--testsuites/sptests/spatomic04/spatomic04.scn102
-rw-r--r--testsuites/sptests/spatomic04/system.h51
-rw-r--r--testsuites/sptests/spatomic04/tasks.c102
-rw-r--r--testsuites/sptests/spatomic05/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic05/init.c68
-rw-r--r--testsuites/sptests/spatomic05/spatomic05.doc23
-rw-r--r--testsuites/sptests/spatomic05/spatomic05.scn102
-rw-r--r--testsuites/sptests/spatomic05/system.h51
-rw-r--r--testsuites/sptests/spatomic05/tasks.c101
-rw-r--r--testsuites/sptests/spatomic06/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic06/init.c68
-rw-r--r--testsuites/sptests/spatomic06/spatomic06.doc23
-rw-r--r--testsuites/sptests/spatomic06/spatomic06.scn102
-rw-r--r--testsuites/sptests/spatomic06/system.h51
-rw-r--r--testsuites/sptests/spatomic06/tasks.c101
-rw-r--r--testsuites/sptests/spatomic07/Makefile.am24
-rw-r--r--testsuites/sptests/spatomic07/init.c68
-rw-r--r--testsuites/sptests/spatomic07/spatomic07.doc24
-rw-r--r--testsuites/sptests/spatomic07/spatomic07.scn102
-rw-r--r--testsuites/sptests/spatomic07/system.h51
-rw-r--r--testsuites/sptests/spatomic07/tasks.c117
44 files changed, 1 insertions, 2532 deletions
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index e40dbab007..cd3114a083 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -28,9 +28,7 @@ SUBDIRS = \
spintrcritical17 spintrcritical18 spmkdir spmountmgr01 spheapprot \
spsem01 spsem02 spsimplesched01 spsimplesched02 spsimplesched03 spnsext01 \
spedfsched01 spedfsched02 spedfsched03 \
- spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \
- spatomic01 spatomic02 spatomic03 spatomic04 spatomic05 \
- spatomic06 spatomic07
+ spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01
SUBDIRS += spcontext01
SUBDIRS += spfatal26
SUBDIRS += speventtransient01
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index d39ddf1e05..b8fb57c9b5 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -20,15 +20,11 @@ RTEMS_PROG_CC_FOR_TARGET
RTEMS_CANONICALIZE_TOOLS
-RTEMS_CHECK_CPUOPTS([RTEMS_ATOMIC])
-
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
# FIXME: We should get rid of this. It's a cludge.
AC_CHECK_SIZEOF([time_t])
-AM_CONDITIONAL([ATOMIC],[test x"$rtems_cv_RTEMS_ATOMIC" = xyes])
-
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
spcontext01/Makefile
@@ -117,13 +113,6 @@ sp76/Makefile
sp77/Makefile
sp2038/Makefile
spassoc01/Makefile
-spatomic01/Makefile
-spatomic02/Makefile
-spatomic03/Makefile
-spatomic04/Makefile
-spatomic05/Makefile
-spatomic06/Makefile
-spatomic07/Makefile
spcbssched01/Makefile
spcbssched02/Makefile
spcbssched03/Makefile
diff --git a/testsuites/sptests/spatomic01/Makefile.am b/testsuites/sptests/spatomic01/Makefile.am
deleted file mode 100644
index 3bf1e11009..0000000000
--- a/testsuites/sptests/spatomic01/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic01
-spatomic01_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic01.scn
-dist_rtems_tests_DATA += spatomic01.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic01_OBJECTS)
-LINK_LIBS = $(spatomic01_LDLIBS)
-
-spatomic01$(EXEEXT): $(spatomic01_OBJECTS) $(spatomic01_DEPENDENCIES)
- @rm -f spatomic01$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic01/init.c b/testsuites/sptests/spatomic01/init.c
deleted file mode 100644
index 7326bf7c95..0000000000
--- a/testsuites/sptests/spatomic01/init.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic load operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic01 TEST ***\n" );
-
- /* Create and start tasks to test */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic01/spatomic01.doc b/testsuites/sptests/spatomic01/spatomic01.doc
deleted file mode 100644
index dc322a3f55..0000000000
--- a/testsuites/sptests/spatomic01/spatomic01.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic01
-
-directives:
-
- _Atomic_Load_int
- _Atomic_Load_long
- _Atomic_Load_ptr
- _Atomic_Load_32
- _Atomic_Load_64
-
-concepts:
-
-+ Ensure that the atomic load operations listed above behave as defined.
diff --git a/testsuites/sptests/spatomic01/spatomic01.scn b/testsuites/sptests/spatomic01/spatomic01.scn
deleted file mode 100644
index 9979d8033c..0000000000
--- a/testsuites/sptests/spatomic01/spatomic01.scn
+++ /dev/null
@@ -1,70 +0,0 @@
-*** spatomic01 TEST ***
-
-
-task0: _Atomic_Load_int: SUCCESS
-
-task0: _Atomic_Load_long: SUCCESS
-
-task0: _Atomic_Load_ptr: SUCCESS
-
-task0: _Atomic_Load_32: SUCCESS
-
-task0: _Atomic_Load_int: SUCCESS
-
-task0: _Atomic_Load_long: SUCCESS
-
-task0: _Atomic_Load_ptr: SUCCESS
-
-task0: _Atomic_Load_32: SUCCESS
-
-task1: _Atomic_Load_int: SUCCESS
-
-task1: _Atomic_Load_long: SUCCESS
-
-task1: _Atomic_Load_ptr: SUCCESS
-
-task1: _Atomic_Load_32: SUCCESS
-
-task1: _Atomic_Load_int: SUCCESS
-
-task1: _Atomic_Load_long: SUCCESS
-
-task1: _Atomic_Load_ptr: SUCCESS
-
-task1: _Atomic_Load_32: SUCCESS
-
-task2: _Atomic_Load_int: SUCCESS
-
-task2: _Atomic_Load_long: SUCCESS
-
-task2: _Atomic_Load_ptr: SUCCESS
-
-task2: _Atomic_Load_32: SUCCESS
-
-task2: _Atomic_Load_int: SUCCESS
-
-task2: _Atomic_Load_long: SUCCESS
-
-task2: _Atomic_Load_ptr: SUCCESS
-
-task2: _Atomic_Load_32: SUCCESS
-
-task3: _Atomic_Load_int: SUCCESS
-
-task3: _Atomic_Load_long: SUCCESS
-
-task3: _Atomic_Load_ptr: SUCCESS
-
-task3: _Atomic_Load_32: SUCCESS
-
-task3: _Atomic_Load_int: SUCCESS
-
-task3: _Atomic_Load_long: SUCCESS
-
-task3: _Atomic_Load_ptr: SUCCESS
-
-task3: _Atomic_Load_32: SUCCESS
-
-
-*** END OF TEST spatomic01 ***
-
diff --git a/testsuites/sptests/spatomic01/system.h b/testsuites/sptests/spatomic01/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic01/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic01/tasks.c b/testsuites/sptests/spatomic01/tasks.c
deleted file mode 100644
index 9392a5b612..0000000000
--- a/testsuites/sptests/spatomic01/tasks.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic load operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_LOAD_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar) \
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- unsigned int i; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- b = (R_TYPE)rand(); \
- atomic_init(&t, b); \
- a = _Atomic_Load_##NAME(&t, mem_bar); \
- rtems_test_assert(a == b); \
- } \
- printf("\ntask%d: Atomic_Load_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_LOAD_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_LOAD_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test acquire barrier */
- ATOMIC_LOAD_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- ATOMIC_LOAD_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic01 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}
diff --git a/testsuites/sptests/spatomic02/Makefile.am b/testsuites/sptests/spatomic02/Makefile.am
deleted file mode 100644
index cf3e655ae5..0000000000
--- a/testsuites/sptests/spatomic02/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic02
-spatomic02_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic02.scn
-dist_rtems_tests_DATA += spatomic02.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic02_OBJECTS)
-LINK_LIBS = $(spatomic02_LDLIBS)
-
-spatomic02$(EXEEXT): $(spatomic02_OBJECTS) $(spatomic02_DEPENDENCIES)
- @rm -f spatomic01$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic02/init.c b/testsuites/sptests/spatomic02/init.c
deleted file mode 100644
index 7eec1ea8b5..0000000000
--- a/testsuites/sptests/spatomic02/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic store operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic02 TEST ***\n" );
-
- /* Initialize the TaskRan array */
- for ( i=0; i<TASK_NUMS ; i++ ) {
- TaskRan[i] = false;
- }
-
- /* Create and start tasks for each processor */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic02/spatomic02.doc b/testsuites/sptests/spatomic02/spatomic02.doc
deleted file mode 100644
index 70e674422d..0000000000
--- a/testsuites/sptests/spatomic02/spatomic02.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic02
-
-directives:
-
- _Atomic_Store_int
- _Atomic_Store_long
- _Atomic_Store_ptr
- _Atomic_Store_32
- _Atomic_Store_64
-
-concepts:
-
-+ Ensure that the atomic store operations listed above behave as defined.
diff --git a/testsuites/sptests/spatomic02/spatomic02.scn b/testsuites/sptests/spatomic02/spatomic02.scn
deleted file mode 100644
index 31ba7e977c..0000000000
--- a/testsuites/sptests/spatomic02/spatomic02.scn
+++ /dev/null
@@ -1,70 +0,0 @@
-*** spatomic02 TEST ***
-
-
-task0: _Atomic_Store_int: SUCCESS
-
-task0: _Atomic_Store_long: SUCCESS
-
-task0: _Atomic_Store_ptr: SUCCESS
-
-task0: _Atomic_Store_32: SUCCESS
-
-task0: _Atomic_Store_int: SUCCESS
-
-task0: _Atomic_Store_long: SUCCESS
-
-task0: _Atomic_Store_ptr: SUCCESS
-
-task0: _Atomic_Store_32: SUCCESS
-
-task1: _Atomic_Store_int: SUCCESS
-
-task1: _Atomic_Store_long: SUCCESS
-
-task1: _Atomic_Store_ptr: SUCCESS
-
-task1: _Atomic_Store_32: SUCCESS
-
-task1: _Atomic_Store_int: SUCCESS
-
-task1: _Atomic_Store_long: SUCCESS
-
-task1: _Atomic_Store_ptr: SUCCESS
-
-task1: _Atomic_Store_32: SUCCESS
-
-task2: _Atomic_Store_int: SUCCESS
-
-task2: _Atomic_Store_long: SUCCESS
-
-task2: _Atomic_Store_ptr: SUCCESS
-
-task2: _Atomic_Store_32: SUCCESS
-
-task2: _Atomic_Store_int: SUCCESS
-
-task2: _Atomic_Store_long: SUCCESS
-
-task2: _Atomic_Store_ptr: SUCCESS
-
-task2: _Atomic_Store_32: SUCCESS
-
-task3: _Atomic_Store_int: SUCCESS
-
-task3: _Atomic_Store_long: SUCCESS
-
-task3: _Atomic_Store_ptr: SUCCESS
-
-task3: _Atomic_Store_32: SUCCESS
-
-task3: _Atomic_Store_int: SUCCESS
-
-task3: _Atomic_Store_long: SUCCESS
-
-task3: _Atomic_Store_ptr: SUCCESS
-
-task3: _Atomic_Store_32: SUCCESS
-
-
-*** END OF TEST spatomic02 ***
-
diff --git a/testsuites/sptests/spatomic02/system.h b/testsuites/sptests/spatomic02/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic02/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic02/tasks.c b/testsuites/sptests/spatomic02/tasks.c
deleted file mode 100644
index 558b718ce8..0000000000
--- a/testsuites/sptests/spatomic02/tasks.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic store operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_STORE_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar) \
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- unsigned int i; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- b = (R_TYPE)rand(); \
- _Atomic_Store_##NAME(&t, b, mem_bar); \
- a = _Atomic_Load_##NAME(&t, memory_order_relaxed); \
- rtems_test_assert(a == b); \
- } \
- printf("\ntask%d: Atomic_Store_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_STORE_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_STORE_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test release barrier */
- ATOMIC_STORE_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELEASE);
-
- ATOMIC_STORE_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELEASE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic02 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}
-
diff --git a/testsuites/sptests/spatomic03/Makefile.am b/testsuites/sptests/spatomic03/Makefile.am
deleted file mode 100644
index 15b3b472f4..0000000000
--- a/testsuites/sptests/spatomic03/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic03
-spatomic03_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic03.scn
-dist_rtems_tests_DATA += spatomic03.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic03_OBJECTS)
-LINK_LIBS = $(spatomic03_LDLIBS)
-
-spatomic03$(EXEEXT): $(spatomic03_OBJECTS) $(spatomic03_DEPENDENCIES)
- @rm -f spatomic03$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic03/init.c b/testsuites/sptests/spatomic03/init.c
deleted file mode 100644
index 946797e83a..0000000000
--- a/testsuites/sptests/spatomic03/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic add operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic03 TEST ***\n" );
-
- /* Initialize the TaskRan array */
- for ( i=0; i<TASK_NUMS ; i++ ) {
- TaskRan[i] = false;
- }
-
- /* Create and start tasks for each processor */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic03/spatomic03.doc b/testsuites/sptests/spatomic03/spatomic03.doc
deleted file mode 100644
index 130dca9169..0000000000
--- a/testsuites/sptests/spatomic03/spatomic03.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic03
-
-directives:
-
- _Atomic_Fetch_add_int
- _Atomic_Fetch_add_long
- _Atomic_Fetch_add_ptr
- _Atomic_Fetch_add_32
- _Atomic_Fetch_add_64
-
-concepts:
-
-+ Ensure that the atomic add operations listed above behave as defined.
diff --git a/testsuites/sptests/spatomic03/spatomic03.scn b/testsuites/sptests/spatomic03/spatomic03.scn
deleted file mode 100644
index 69216e5ab0..0000000000
--- a/testsuites/sptests/spatomic03/spatomic03.scn
+++ /dev/null
@@ -1,102 +0,0 @@
-*** spatomic03 TEST ***
-
-
-task0: _Atomic_Fetch_add_int: SUCCESS
-
-task0: _Atomic_Fetch_add_long: SUCCESS
-
-task0: _Atomic_Fetch_add_ptr: SUCCESS
-
-task0: _Atomic_Fetch_add_32: SUCCESS
-
-task0: _Atomic_Fetch_add_int: SUCCESS
-
-task0: _Atomic_Fetch_add_long: SUCCESS
-
-task0: _Atomic_Fetch_add_ptr: SUCCESS
-
-task0: _Atomic_Fetch_add_32: SUCCESS
-
-task0: _Atomic_Fetch_add_int: SUCCESS
-
-task0: _Atomic_Fetch_add_long: SUCCESS
-
-task0: _Atomic_Fetch_add_ptr: SUCCESS
-
-task0: _Atomic_Fetch_add_32: SUCCESS
-
-task1: _Atomic_Fetch_add_int: SUCCESS
-
-task1: _Atomic_Fetch_add_long: SUCCESS
-
-task1: _Atomic_Fetch_add_ptr: SUCCESS
-
-task1: _Atomic_Fetch_add_32: SUCCESS
-
-task1: _Atomic_Fetch_add_int: SUCCESS
-
-task1: _Atomic_Fetch_add_long: SUCCESS
-
-task1: _Atomic_Fetch_add_ptr: SUCCESS
-
-task1: _Atomic_Fetch_add_32: SUCCESS
-
-task1: _Atomic_Fetch_add_int: SUCCESS
-
-task1: _Atomic_Fetch_add_long: SUCCESS
-
-task1: _Atomic_Fetch_add_ptr: SUCCESS
-
-task1: _Atomic_Fetch_add_32: SUCCESS
-
-task2: _Atomic_Fetch_add_int: SUCCESS
-
-task2: _Atomic_Fetch_add_long: SUCCESS
-
-task2: _Atomic_Fetch_add_ptr: SUCCESS
-
-task2: _Atomic_Fetch_add_32: SUCCESS
-
-task2: _Atomic_Fetch_add_int: SUCCESS
-
-task2: _Atomic_Fetch_add_long: SUCCESS
-
-task2: _Atomic_Fetch_add_ptr: SUCCESS
-
-task2: _Atomic_Fetch_add_32: SUCCESS
-
-task2: _Atomic_Fetch_add_int: SUCCESS
-
-task2: _Atomic_Fetch_add_long: SUCCESS
-
-task2: _Atomic_Fetch_add_ptr: SUCCESS
-
-task2: _Atomic_Fetch_add_32: SUCCESS
-
-task3: _Atomic_Fetch_add_int: SUCCESS
-
-task3: _Atomic_Fetch_add_long: SUCCESS
-
-task3: _Atomic_Fetch_add_ptr: SUCCESS
-
-task3: _Atomic_Fetch_add_32: SUCCESS
-
-task3: _Atomic_Fetch_add_int: SUCCESS
-
-task3: _Atomic_Fetch_add_long: SUCCESS
-
-task3: _Atomic_Fetch_add_ptr: SUCCESS
-
-task3: _Atomic_Fetch_add_32: SUCCESS
-
-task3: _Atomic_Fetch_add_int: SUCCESS
-
-task3: _Atomic_Fetch_add_long: SUCCESS
-
-task3: _Atomic_Fetch_add_ptr: SUCCESS
-
-task3: _Atomic_Fetch_add_32: SUCCESS
-
-
-*** END OF TEST spatomic03 ***
-
diff --git a/testsuites/sptests/spatomic03/system.h b/testsuites/sptests/spatomic03/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic03/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic03/tasks.c b/testsuites/sptests/spatomic03/tasks.c
deleted file mode 100644
index d03cf54ed1..0000000000
--- a/testsuites/sptests/spatomic03/tasks.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic add operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_FETCH_ADD_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar)\
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- R_TYPE c; \
- unsigned int i; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- a = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- b = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- _Atomic_Fetch_add_##NAME(&t, b, mem_bar); \
- c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_RELAXED); \
- rtems_test_assert(c == (R_TYPE)(a + b)); \
- } \
- printf("\ntask%d: Atomic_Fetch_add_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_FETCH_ADD_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_FETCH_ADD_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test acquire barrier */
- ATOMIC_FETCH_ADD_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- ATOMIC_FETCH_ADD_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- /* test release barrier */
- ATOMIC_FETCH_ADD_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELEASE);
-
- ATOMIC_FETCH_ADD_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELEASE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic03 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}
-
diff --git a/testsuites/sptests/spatomic04/Makefile.am b/testsuites/sptests/spatomic04/Makefile.am
deleted file mode 100644
index d03e8b514c..0000000000
--- a/testsuites/sptests/spatomic04/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic04
-spatomic04_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic04.scn
-dist_rtems_tests_DATA += spatomic04.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic04_OBJECTS)
-LINK_LIBS = $(spatomic04_LDLIBS)
-
-spatomic04$(EXEEXT): $(spatomic04_OBJECTS) $(spatomic04_DEPENDENCIES)
- @rm -f spatomic04$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic04/init.c b/testsuites/sptests/spatomic04/init.c
deleted file mode 100644
index f0b0751cf6..0000000000
--- a/testsuites/sptests/spatomic04/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic sub operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic04 TEST ***\n" );
-
- /* Initialize the TaskRan array */
- for ( i=0; i<TASK_NUMS ; i++ ) {
- TaskRan[i] = false;
- }
-
- /* Create and start tasks for each processor */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic04/spatomic04.doc b/testsuites/sptests/spatomic04/spatomic04.doc
deleted file mode 100644
index 6fc8f09cc4..0000000000
--- a/testsuites/sptests/spatomic04/spatomic04.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic04
-
-directives:
-
- _Atomic_Fetch_sub_int
- _Atomic_Fetch_sub_long
- _Atomic_Fetch_sub_ptr
- _Atomic_Fetch_sub_32
- _Atomic_Fetch_sub_64
-
-concepts:
-
-+ Ensure that the atomic sub operations listed above behave as defined.
diff --git a/testsuites/sptests/spatomic04/spatomic04.scn b/testsuites/sptests/spatomic04/spatomic04.scn
deleted file mode 100644
index 550e87e791..0000000000
--- a/testsuites/sptests/spatomic04/spatomic04.scn
+++ /dev/null
@@ -1,102 +0,0 @@
-patomic04 TEST ***
-
-
-task0: _Atomic_Fetch_sub_int: SUCCESS
-
-task0: _Atomic_Fetch_sub_long: SUCCESS
-
-task0: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task0: _Atomic_Fetch_sub_32: SUCCESS
-
-task0: _Atomic_Fetch_sub_int: SUCCESS
-
-task0: _Atomic_Fetch_sub_long: SUCCESS
-
-task0: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task0: _Atomic_Fetch_sub_32: SUCCESS
-
-task0: _Atomic_Fetch_sub_int: SUCCESS
-
-task0: _Atomic_Fetch_sub_long: SUCCESS
-
-task0: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task0: _Atomic_Fetch_sub_32: SUCCESS
-
-task1: _Atomic_Fetch_sub_int: SUCCESS
-
-task1: _Atomic_Fetch_sub_long: SUCCESS
-
-task1: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task1: _Atomic_Fetch_sub_32: SUCCESS
-
-task1: _Atomic_Fetch_sub_int: SUCCESS
-
-task1: _Atomic_Fetch_sub_long: SUCCESS
-
-task1: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task1: _Atomic_Fetch_sub_32: SUCCESS
-
-task1: _Atomic_Fetch_sub_int: SUCCESS
-
-task1: _Atomic_Fetch_sub_long: SUCCESS
-
-task1: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task1: _Atomic_Fetch_sub_32: SUCCESS
-
-task2: _Atomic_Fetch_sub_int: SUCCESS
-
-task2: _Atomic_Fetch_sub_long: SUCCESS
-
-task2: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task2: _Atomic_Fetch_sub_32: SUCCESS
-
-task2: _Atomic_Fetch_sub_int: SUCCESS
-
-task2: _Atomic_Fetch_sub_long: SUCCESS
-
-task2: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task2: _Atomic_Fetch_sub_32: SUCCESS
-
-task2: _Atomic_Fetch_sub_int: SUCCESS
-
-task2: _Atomic_Fetch_sub_long: SUCCESS
-
-task2: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task2: _Atomic_Fetch_sub_32: SUCCESS
-
-task3: _Atomic_Fetch_sub_int: SUCCESS
-
-task3: _Atomic_Fetch_sub_long: SUCCESS
-
-task3: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task3: _Atomic_Fetch_sub_32: SUCCESS
-
-task3: _Atomic_Fetch_sub_int: SUCCESS
-
-task3: _Atomic_Fetch_sub_long: SUCCESS
-
-task3: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task3: _Atomic_Fetch_sub_32: SUCCESS
-
-task3: _Atomic_Fetch_sub_int: SUCCESS
-
-task3: _Atomic_Fetch_sub_long: SUCCESS
-
-task3: _Atomic_Fetch_sub_ptr: SUCCESS
-
-task3: _Atomic_Fetch_sub_32: SUCCESS
-
-
-*** END OF TEST spatomic04 ***
-
diff --git a/testsuites/sptests/spatomic04/system.h b/testsuites/sptests/spatomic04/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic04/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic04/tasks.c b/testsuites/sptests/spatomic04/tasks.c
deleted file mode 100644
index 9f587befea..0000000000
--- a/testsuites/sptests/spatomic04/tasks.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic sub operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_FETCH_SUB_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar)\
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- R_TYPE c; \
- unsigned int i; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- a = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- b = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- _Atomic_Fetch_sub_##NAME(&t, b, mem_bar); \
- c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_RELAXED); \
- rtems_test_assert(c == (R_TYPE)(a - b)); \
- } \
- printf("\ntask%d: Atomic_Fetch_sub_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_FETCH_SUB_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_FETCH_SUB_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test acquire barrier */
- ATOMIC_FETCH_SUB_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- ATOMIC_FETCH_SUB_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- /* test release barrier */
- ATOMIC_FETCH_SUB_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELEASE);
-
- ATOMIC_FETCH_SUB_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELEASE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic04 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}
-
diff --git a/testsuites/sptests/spatomic05/Makefile.am b/testsuites/sptests/spatomic05/Makefile.am
deleted file mode 100644
index cf72b8e7a4..0000000000
--- a/testsuites/sptests/spatomic05/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic05
-spatomic05_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic05.scn
-dist_rtems_tests_DATA += spatomic05.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic05_OBJECTS)
-LINK_LIBS = $(spatomic05_LDLIBS)
-
-spatomic05$(EXEEXT): $(spatomic05_OBJECTS) $(spatomic05_DEPENDENCIES)
- @rm -f spatomic05$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic05/init.c b/testsuites/sptests/spatomic05/init.c
deleted file mode 100644
index 328d41733f..0000000000
--- a/testsuites/sptests/spatomic05/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic and operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic05 TEST ***\n" );
-
- /* Initialize the TaskRan array */
- for ( i=0; i<TASK_NUMS ; i++ ) {
- TaskRan[i] = false;
- }
-
- /* Create and start tasks for each processor */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic05/spatomic05.doc b/testsuites/sptests/spatomic05/spatomic05.doc
deleted file mode 100644
index 018dd64a3b..0000000000
--- a/testsuites/sptests/spatomic05/spatomic05.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic05
-
-directives:
-
- _Atomic_Fetch_and_int
- _Atomic_Fetch_and_long
- _Atomic_Fetch_and_ptr
- _Atomic_Fetch_and_32
- _Atomic_Fetch_and_64
-
-concepts:
-
-+ Ensure that the atomic and operations listed above behave as defined.
diff --git a/testsuites/sptests/spatomic05/spatomic05.scn b/testsuites/sptests/spatomic05/spatomic05.scn
deleted file mode 100644
index 84020b9d68..0000000000
--- a/testsuites/sptests/spatomic05/spatomic05.scn
+++ /dev/null
@@ -1,102 +0,0 @@
-patomic05 TEST ***
-
-
-task0: _Atomic_Fetch_and_int: SUCCESS
-
-task0: _Atomic_Fetch_and_long: SUCCESS
-
-task0: _Atomic_Fetch_and_ptr: SUCCESS
-
-task0: _Atomic_Fetch_and_32: SUCCESS
-
-task0: _Atomic_Fetch_and_int: SUCCESS
-
-task0: _Atomic_Fetch_and_long: SUCCESS
-
-task0: _Atomic_Fetch_and_ptr: SUCCESS
-
-task0: _Atomic_Fetch_and_32: SUCCESS
-
-task0: _Atomic_Fetch_and_int: SUCCESS
-
-task0: _Atomic_Fetch_and_long: SUCCESS
-
-task0: _Atomic_Fetch_and_ptr: SUCCESS
-
-task0: _Atomic_Fetch_and_32: SUCCESS
-
-task1: _Atomic_Fetch_and_int: SUCCESS
-
-task1: _Atomic_Fetch_and_long: SUCCESS
-
-task1: _Atomic_Fetch_and_ptr: SUCCESS
-
-task1: _Atomic_Fetch_and_32: SUCCESS
-
-task1: _Atomic_Fetch_and_int: SUCCESS
-
-task1: _Atomic_Fetch_and_long: SUCCESS
-
-task1: _Atomic_Fetch_and_ptr: SUCCESS
-
-task1: _Atomic_Fetch_and_32: SUCCESS
-
-task1: _Atomic_Fetch_and_int: SUCCESS
-
-task1: _Atomic_Fetch_and_long: SUCCESS
-
-task1: _Atomic_Fetch_and_ptr: SUCCESS
-
-task1: _Atomic_Fetch_and_32: SUCCESS
-
-task2: _Atomic_Fetch_and_int: SUCCESS
-
-task2: _Atomic_Fetch_and_long: SUCCESS
-
-task2: _Atomic_Fetch_and_ptr: SUCCESS
-
-task2: _Atomic_Fetch_and_32: SUCCESS
-
-task2: _Atomic_Fetch_and_int: SUCCESS
-
-task2: _Atomic_Fetch_and_long: SUCCESS
-
-task2: _Atomic_Fetch_and_ptr: SUCCESS
-
-task2: _Atomic_Fetch_and_32: SUCCESS
-
-task2: _Atomic_Fetch_and_int: SUCCESS
-
-task2: _Atomic_Fetch_and_long: SUCCESS
-
-task2: _Atomic_Fetch_and_ptr: SUCCESS
-
-task2: _Atomic_Fetch_and_32: SUCCESS
-
-task3: _Atomic_Fetch_and_int: SUCCESS
-
-task3: _Atomic_Fetch_and_long: SUCCESS
-
-task3: _Atomic_Fetch_and_ptr: SUCCESS
-
-task3: _Atomic_Fetch_and_32: SUCCESS
-
-task3: _Atomic_Fetch_and_int: SUCCESS
-
-task3: _Atomic_Fetch_and_long: SUCCESS
-
-task3: _Atomic_Fetch_and_ptr: SUCCESS
-
-task3: _Atomic_Fetch_and_32: SUCCESS
-
-task3: _Atomic_Fetch_and_int: SUCCESS
-
-task3: _Atomic_Fetch_and_long: SUCCESS
-
-task3: _Atomic_Fetch_and_ptr: SUCCESS
-
-task3: _Atomic_Fetch_and_32: SUCCESS
-
-
-*** END OF TEST spatomic05 ***
-
diff --git a/testsuites/sptests/spatomic05/system.h b/testsuites/sptests/spatomic05/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic05/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic05/tasks.c b/testsuites/sptests/spatomic05/tasks.c
deleted file mode 100644
index 5f93dae119..0000000000
--- a/testsuites/sptests/spatomic05/tasks.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic and operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_FETCH_AND_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar)\
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- R_TYPE c; \
- unsigned int i; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- a = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- b = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- _Atomic_Fetch_and_##NAME(&t, b, mem_bar); \
- c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_RELAXED); \
- rtems_test_assert(c == (R_TYPE)(a & b)); \
- } \
- printf("\ntask%d: Atomic_Fetch_and_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_FETCH_AND_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_FETCH_AND_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test acquire barrier */
- ATOMIC_FETCH_AND_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- ATOMIC_FETCH_AND_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- /* test release barrier */
- ATOMIC_FETCH_AND_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELEASE);
-
- ATOMIC_FETCH_AND_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELEASE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic05 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}
diff --git a/testsuites/sptests/spatomic06/Makefile.am b/testsuites/sptests/spatomic06/Makefile.am
deleted file mode 100644
index 82150f9fe4..0000000000
--- a/testsuites/sptests/spatomic06/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic06
-spatomic06_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic06.scn
-dist_rtems_tests_DATA += spatomic06.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic06_OBJECTS)
-LINK_LIBS = $(spatomic06_LDLIBS)
-
-spatomic06$(EXEEXT): $(spatomic06_OBJECTS) $(spatomic06_DEPENDENCIES)
- @rm -f spatomic06$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic06/init.c b/testsuites/sptests/spatomic06/init.c
deleted file mode 100644
index 4a7ecfc817..0000000000
--- a/testsuites/sptests/spatomic06/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic or operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic06 TEST ***\n" );
-
- /* Initialize the TaskRan array */
- for ( i=0; i<TASK_NUMS ; i++ ) {
- TaskRan[i] = false;
- }
-
- /* Create and start tasks for each processor */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic06/spatomic06.doc b/testsuites/sptests/spatomic06/spatomic06.doc
deleted file mode 100644
index 5a4d033c4f..0000000000
--- a/testsuites/sptests/spatomic06/spatomic06.doc
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic06
-
-directives:
-
- _Atomic_Fetch_or_int
- _Atomic_Fetch_or_long
- _Atomic_Fetch_or_ptr
- _Atomic_Fetch_or_32
- _Atomic_Fetch_or_64
-
-concepts:
-
-+ Ensure that the atomic or operations listed above behave as defined.
diff --git a/testsuites/sptests/spatomic06/spatomic06.scn b/testsuites/sptests/spatomic06/spatomic06.scn
deleted file mode 100644
index 14290616ba..0000000000
--- a/testsuites/sptests/spatomic06/spatomic06.scn
+++ /dev/null
@@ -1,102 +0,0 @@
-*** spatomic06 TEST ***
-
-
-task0: _Atomic_Fetch_or_int: SUCCESS
-
-task0: _Atomic_Fetch_or_long: SUCCESS
-
-task0: _Atomic_Fetch_or_ptr: SUCCESS
-
-task0: _Atomic_Fetch_or_32: SUCCESS
-
-task0: _Atomic_Fetch_or_int: SUCCESS
-
-task0: _Atomic_Fetch_or_long: SUCCESS
-
-task0: _Atomic_Fetch_or_ptr: SUCCESS
-
-task0: _Atomic_Fetch_or_32: SUCCESS
-
-task0: _Atomic_Fetch_or_int: SUCCESS
-
-task0: _Atomic_Fetch_or_long: SUCCESS
-
-task0: _Atomic_Fetch_or_ptr: SUCCESS
-
-task0: _Atomic_Fetch_or_32: SUCCESS
-
-task1: _Atomic_Fetch_or_int: SUCCESS
-
-task1: _Atomic_Fetch_or_long: SUCCESS
-
-task1: _Atomic_Fetch_or_ptr: SUCCESS
-
-task1: _Atomic_Fetch_or_32: SUCCESS
-
-task1: _Atomic_Fetch_or_int: SUCCESS
-
-task1: _Atomic_Fetch_or_long: SUCCESS
-
-task1: _Atomic_Fetch_or_ptr: SUCCESS
-
-task1: _Atomic_Fetch_or_32: SUCCESS
-
-task1: _Atomic_Fetch_or_int: SUCCESS
-
-task1: _Atomic_Fetch_or_long: SUCCESS
-
-task1: _Atomic_Fetch_or_ptr: SUCCESS
-
-task1: _Atomic_Fetch_or_32: SUCCESS
-
-task2: _Atomic_Fetch_or_int: SUCCESS
-
-task2: _Atomic_Fetch_or_long: SUCCESS
-
-task2: _Atomic_Fetch_or_ptr: SUCCESS
-
-task2: _Atomic_Fetch_or_32: SUCCESS
-
-task2: _Atomic_Fetch_or_int: SUCCESS
-
-task2: _Atomic_Fetch_or_long: SUCCESS
-
-task2: _Atomic_Fetch_or_ptr: SUCCESS
-
-task2: _Atomic_Fetch_or_32: SUCCESS
-
-task2: _Atomic_Fetch_or_int: SUCCESS
-
-task2: _Atomic_Fetch_or_long: SUCCESS
-
-task2: _Atomic_Fetch_or_ptr: SUCCESS
-
-task2: _Atomic_Fetch_or_32: SUCCESS
-
-task3: _Atomic_Fetch_or_int: SUCCESS
-
-task3: _Atomic_Fetch_or_long: SUCCESS
-
-task3: _Atomic_Fetch_or_ptr: SUCCESS
-
-task3: _Atomic_Fetch_or_32: SUCCESS
-
-task3: _Atomic_Fetch_or_int: SUCCESS
-
-task3: _Atomic_Fetch_or_long: SUCCESS
-
-task3: _Atomic_Fetch_or_ptr: SUCCESS
-
-task3: _Atomic_Fetch_or_32: SUCCESS
-
-task3: _Atomic_Fetch_or_int: SUCCESS
-
-task3: _Atomic_Fetch_or_long: SUCCESS
-
-task3: _Atomic_Fetch_or_ptr: SUCCESS
-
-task3: _Atomic_Fetch_or_32: SUCCESS
-
-
-*** END OF TEST spatomic06 ***
-
diff --git a/testsuites/sptests/spatomic06/system.h b/testsuites/sptests/spatomic06/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic06/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic06/tasks.c b/testsuites/sptests/spatomic06/tasks.c
deleted file mode 100644
index b03d3f0275..0000000000
--- a/testsuites/sptests/spatomic06/tasks.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic or operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_FETCH_OR_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar) \
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- R_TYPE c; \
- unsigned int i; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- a = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- b = (R_TYPE)(rand() % ((R_TYPE)-1 / 2)); \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- _Atomic_Fetch_or_##NAME(&t, b, mem_bar); \
- c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_RELAXED); \
- rtems_test_assert(c == (R_TYPE)(a | b)); \
- } \
- printf("\ntask%d: Atomic_Fetch_or_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_FETCH_OR_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_FETCH_OR_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test acquire barrier */
- ATOMIC_FETCH_OR_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- ATOMIC_FETCH_OR_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- /* test release barrier */
- ATOMIC_FETCH_OR_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELEASE);
-
- ATOMIC_FETCH_OR_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELEASE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic06 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}
diff --git a/testsuites/sptests/spatomic07/Makefile.am b/testsuites/sptests/spatomic07/Makefile.am
deleted file mode 100644
index bd63c527e8..0000000000
--- a/testsuites/sptests/spatomic07/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-if ATOMIC
-rtems_tests_PROGRAMS = spatomic07
-spatomic07_SOURCES = init.c tasks.c system.h
-
-dist_rtems_tests_DATA = spatomic07.scn
-dist_rtems_tests_DATA += spatomic07.doc
-endif
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if ATOMIC
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-
-LINK_OBJS = $(spatomic07_OBJECTS)
-LINK_LIBS = $(spatomic07_LDLIBS)
-
-spatomic07$(EXEEXT): $(spatomic07_OBJECTS) $(spatomic07_DEPENDENCIES)
- @rm -f spatomic07$(EXEEXT)
- $(make-exe)
-endif
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spatomic07/init.c b/testsuites/sptests/spatomic07/init.c
deleted file mode 100644
index 3cc1b27488..0000000000
--- a/testsuites/sptests/spatomic07/init.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic compare and exchange operation.
- *
- * 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
-
-#define CONFIGURE_INIT
-#include "system.h"
-
-rtems_task Init(
- rtems_task_argument argument
-)
-{
- int i;
- char ch;
- rtems_id id;
- rtems_status_code status;
-
- /* Put start of test message */
- puts( "\n\n*** spatomic07 TEST ***\n" );
-
- /* Initialize the TaskRan array */
- for ( i=0; i<TASK_NUMS ; i++ ) {
- TaskRan[i] = false;
- }
-
- /* Create and start tasks for each processor */
- for ( i=0; i< TASK_NUMS ; i++ ) {
- ch = '0' + i;
-
- status = rtems_task_create(
- rtems_build_name( 'T', 'A', ch, ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Test_task, i );
- directive_failed( status, "task start" );
- }
-
- status = rtems_task_create(
- rtems_build_name( 'A', 'T', '0', ' ' ),
- 1,
- RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id
- );
- directive_failed( status, "task create" );
-
- status = rtems_task_start( id, Wait_task, 0 );
- directive_failed( status, "task start" );
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
diff --git a/testsuites/sptests/spatomic07/spatomic07.doc b/testsuites/sptests/spatomic07/spatomic07.doc
deleted file mode 100644
index 4ade88f4f9..0000000000
--- a/testsuites/sptests/spatomic07/spatomic07.doc
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-#
-
-This file describes the directives and concepts tested by this test set.
-
-test set name: spatomic07
-
-directives:
-
- _Atomic_Compare_exchange_int
- _Atomic_Compare_exchange_long
- _Atomic_Compare_exchange_ptr
- _Atomic_Compare_exchange_32
- _Atomic_Compare_exchange_64
-
-concepts:
-
-+ Ensure that the atomic compare and exchange operations listed above behave
- as defined.
diff --git a/testsuites/sptests/spatomic07/spatomic07.scn b/testsuites/sptests/spatomic07/spatomic07.scn
deleted file mode 100644
index bb37ba6910..0000000000
--- a/testsuites/sptests/spatomic07/spatomic07.scn
+++ /dev/null
@@ -1,102 +0,0 @@
-patomic07 TEST ***
-
-
-task0: _Atomic_Compare_exchange_int: SUCCESS
-
-task0: _Atomic_Compare_exchange_long: SUCCESS
-
-task0: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task0: _Atomic_Compare_exchange_32: SUCCESS
-
-task0: _Atomic_Compare_exchange_int: SUCCESS
-
-task0: _Atomic_Compare_exchange_long: SUCCESS
-
-task0: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task0: _Atomic_Compare_exchange_32: SUCCESS
-
-task0: _Atomic_Compare_exchange_int: SUCCESS
-
-task0: _Atomic_Compare_exchange_long: SUCCESS
-
-task0: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task0: _Atomic_Compare_exchange_32: SUCCESS
-
-task1: _Atomic_Compare_exchange_int: SUCCESS
-
-task1: _Atomic_Compare_exchange_long: SUCCESS
-
-task1: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task1: _Atomic_Compare_exchange_32: SUCCESS
-
-task1: _Atomic_Compare_exchange_int: SUCCESS
-
-task1: _Atomic_Compare_exchange_long: SUCCESS
-
-task1: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task1: _Atomic_Compare_exchange_32: SUCCESS
-
-task1: _Atomic_Compare_exchange_int: SUCCESS
-
-task1: _Atomic_Compare_exchange_long: SUCCESS
-
-task1: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task1: _Atomic_Compare_exchange_32: SUCCESS
-
-task2: _Atomic_Compare_exchange_int: SUCCESS
-
-task2: _Atomic_Compare_exchange_long: SUCCESS
-
-task2: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task2: _Atomic_Compare_exchange_32: SUCCESS
-
-task2: _Atomic_Compare_exchange_int: SUCCESS
-
-task2: _Atomic_Compare_exchange_long: SUCCESS
-
-task2: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task2: _Atomic_Compare_exchange_32: SUCCESS
-
-task2: _Atomic_Compare_exchange_int: SUCCESS
-
-task2: _Atomic_Compare_exchange_long: SUCCESS
-
-task2: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task2: _Atomic_Compare_exchange_32: SUCCESS
-
-task3: _Atomic_Compare_exchange_int: SUCCESS
-
-task3: _Atomic_Compare_exchange_long: SUCCESS
-
-task3: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task3: _Atomic_Compare_exchange_32: SUCCESS
-
-task3: _Atomic_Compare_exchange_int: SUCCESS
-
-task3: _Atomic_Compare_exchange_long: SUCCESS
-
-task3: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task3: _Atomic_Compare_exchange_32: SUCCESS
-
-task3: _Atomic_Compare_exchange_int: SUCCESS
-
-task3: _Atomic_Compare_exchange_long: SUCCESS
-
-task3: _Atomic_Compare_exchange_ptr: SUCCESS
-
-task3: _Atomic_Compare_exchange_32: SUCCESS
-
-
-*** END OF TEST spatomic07 ***
-
diff --git a/testsuites/sptests/spatomic07/system.h b/testsuites/sptests/spatomic07/system.h
deleted file mode 100644
index 55931f24c0..0000000000
--- a/testsuites/sptests/spatomic07/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research 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.
- */
-
-#include "tmacros.h"
-#include "test_support.h"
-
-/* functions */
-
-rtems_task Init(
- rtems_task_argument argument
-);
-
-rtems_task Test_task(
- rtems_task_argument argument
-);
-
-rtems_task Wait_task(
- rtems_task_argument argument
-);
-/* configuration information */
-#define TASK_NUMS 4
-
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS \
- (2 + TASK_NUMS)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#include <rtems/confdefs.h>
-
-/* global variables */
-
-/*
- * Keep the names and IDs in global variables so another task can use them.
- */
-
-TEST_EXTERN volatile bool TaskRan[ TASK_NUMS ];
-
-/*
- * Handy macros and static inline functions
- */
-
-/* end of include file */
diff --git a/testsuites/sptests/spatomic07/tasks.c b/testsuites/sptests/spatomic07/tasks.c
deleted file mode 100644
index 286a99493c..0000000000
--- a/testsuites/sptests/spatomic07/tasks.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2012 Deng Hengyi.
- *
- * This test case is to test atomic compare and exchange operation.
- *
- * 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 "system.h"
-
-#include <stdlib.h>
-#include <rtems/rtems/atomic.h>
-
-#define TEST_REPEAT 1000
-
-#define ATOMIC_CAS_NO_BARRIER(NAME, TYPE, R_TYPE, task_id, mem_bar) \
-{ \
- Atomic_##TYPE t; \
- R_TYPE a; \
- R_TYPE b; \
- unsigned int i; \
- int r; \
- for (i = 0; i < TEST_REPEAT; i++){ \
- a = rand() % (R_TYPE)-1; \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- b = a + 1; \
- r = _Atomic_Compare_exchange_##NAME(&t, &b, a - 1, mem_bar, memory_order_relaxed); \
- if(r != 0){ \
- printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": FAILED\n", (unsigned int)task_id); \
- rtems_test_exit( 0 ); \
- } \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- r = _Atomic_Compare_exchange_##NAME(&t, &a, a - 1, mem_bar, memory_order_relaxed); \
- b = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_RELAXED); \
- if((r == 0) ||((r != 0) && ((a - 1) != b))){ \
- printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": FAILED\n", (unsigned int)task_id); \
- rtems_test_exit( 0 ); \
- } \
- _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELAXED); \
- b = a + 1; \
- r = _Atomic_Compare_exchange_##NAME(&t, &b, a, mem_bar, memory_order_relaxed); \
- if(r != 0){ \
- printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": FAILED\n", (unsigned int)task_id); \
- rtems_test_exit( 0 ); \
- } \
- } \
- printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": SUCCESS\n", (unsigned int)task_id); \
-}
-
-rtems_task Test_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- rtems_status_code status;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Print that the task is up and running. */
- /* test relaxed barrier */
- ATOMIC_CAS_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELAXED);
-
- ATOMIC_CAS_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELAXED);
-
- /* test acquire barrier */
- ATOMIC_CAS_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- ATOMIC_CAS_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_ACQUIRE);
-
- /* test release barrier */
- ATOMIC_CAS_NO_BARRIER(uint, Uint, uint_fast32_t, argument, ATOMIC_ORDER_RELEASE);
-
- ATOMIC_CAS_NO_BARRIER(ptr, Pointer, uintptr_t, argument, ATOMIC_ORDER_RELEASE);
-
- /* Set the flag that the task is up and running */
- TaskRan[argument] = true;
-
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
-}
-
-rtems_task Wait_task(
- rtems_task_argument argument
- )
-{
- char name[5];
- char *p;
- bool allDone;
- int i;
-
- /* Get the task name */
- p = rtems_object_get_name( RTEMS_SELF, 5, name );
- rtems_test_assert( p != NULL );
-
- /* Wait on the all tasks to run */
- while (1) {
- allDone = true;
- for ( i=0; i<TASK_NUMS ; i++ ) {
- if (TaskRan[i] == false)
- allDone = false;
- }
- if (allDone) {
- puts( "\n\n*** END OF TEST spatomic07 ***\n" );
- rtems_test_exit( 0 );
- }
- }
-}