[rtems commit] delete smpatomic0-7 test cases
Joel Sherrill
joel.sherrill at OARcorp.com
Tue Oct 8 14:28:32 UTC 2013
Can you clarify why you deleted these?
Are you adding replacement tests for this code?
On 10/8/2013 9:01 AM, Sebastian Huber wrote:
> Module: rtems
> Branch: master
> Commit: 27a034ef13e70493eb8457821b87346ee96ee4f8
> Changeset: http://git.rtems.org/rtems/commit/?id=27a034ef13e70493eb8457821b87346ee96ee4f8
>
> Author: WeiY <wei.a.yang at gmail.com>
> Date: Sat Sep 28 14:54:37 2013 +0800
>
> delete smpatomic0-7 test cases
>
> ---
>
> testsuites/smptests/Makefile.am | 7 --
> testsuites/smptests/configure.ac | 7 --
> testsuites/smptests/smpatomic01/Makefile.am | 20 -----
> testsuites/smptests/smpatomic01/init.c | 72 -----------------
> testsuites/smptests/smpatomic01/smpatomic01.doc | 23 ------
> testsuites/smptests/smpatomic01/smpatomic01.scn | 28 -------
> testsuites/smptests/smpatomic01/system.h | 50 ------------
> testsuites/smptests/smpatomic01/tasks.c | 73 -----------------
> testsuites/smptests/smpatomic02/Makefile.am | 20 -----
> testsuites/smptests/smpatomic02/init.c | 72 -----------------
> testsuites/smptests/smpatomic02/smpatomic02.doc | 23 ------
> testsuites/smptests/smpatomic02/smpatomic02.scn | 28 -------
> testsuites/smptests/smpatomic02/system.h | 50 ------------
> testsuites/smptests/smpatomic02/tasks.c | 73 -----------------
> testsuites/smptests/smpatomic03/Makefile.am | 20 -----
> testsuites/smptests/smpatomic03/init.c | 72 -----------------
> testsuites/smptests/smpatomic03/smpatomic03.doc | 23 ------
> testsuites/smptests/smpatomic03/smpatomic03.scn | 29 -------
> testsuites/smptests/smpatomic03/system.h | 50 ------------
> testsuites/smptests/smpatomic03/tasks.c | 81 -------------------
> testsuites/smptests/smpatomic04/Makefile.am | 20 -----
> testsuites/smptests/smpatomic04/init.c | 72 -----------------
> testsuites/smptests/smpatomic04/smpatomic04.doc | 23 ------
> testsuites/smptests/smpatomic04/smpatomic04.scn | 29 -------
> testsuites/smptests/smpatomic04/system.h | 50 ------------
> testsuites/smptests/smpatomic04/tasks.c | 81 -------------------
> testsuites/smptests/smpatomic05/Makefile.am | 20 -----
> testsuites/smptests/smpatomic05/init.c | 72 -----------------
> testsuites/smptests/smpatomic05/smpatomic05.doc | 23 ------
> testsuites/smptests/smpatomic05/smpatomic05.scn | 29 -------
> testsuites/smptests/smpatomic05/system.h | 50 ------------
> testsuites/smptests/smpatomic05/tasks.c | 81 -------------------
> testsuites/smptests/smpatomic06/Makefile.am | 20 -----
> testsuites/smptests/smpatomic06/init.c | 72 -----------------
> testsuites/smptests/smpatomic06/smpatomic06.doc | 23 ------
> testsuites/smptests/smpatomic06/smpatomic06.scn | 29 -------
> testsuites/smptests/smpatomic06/system.h | 50 ------------
> testsuites/smptests/smpatomic06/tasks.c | 81 -------------------
> testsuites/smptests/smpatomic07/Makefile.am | 20 -----
> testsuites/smptests/smpatomic07/init.c | 72 -----------------
> testsuites/smptests/smpatomic07/smpatomic07.doc | 24 ------
> testsuites/smptests/smpatomic07/smpatomic07.scn | 29 -------
> testsuites/smptests/smpatomic07/system.h | 50 ------------
> testsuites/smptests/smpatomic07/tasks.c | 97 -----------------------
> 44 files changed, 0 insertions(+), 1938 deletions(-)
>
> diff --git a/testsuites/smptests/Makefile.am b/testsuites/smptests/Makefile.am
> index 55d612f..d8b5a3e 100644
> --- a/testsuites/smptests/Makefile.am
> +++ b/testsuites/smptests/Makefile.am
> @@ -12,13 +12,6 @@ SUBDIRS += smp07
> SUBDIRS += smp08
> SUBDIRS += smp09
> if ATOMIC
> -SUBDIRS += smpatomic01
> -SUBDIRS += smpatomic02
> -SUBDIRS += smpatomic03
> -SUBDIRS += smpatomic04
> -SUBDIRS += smpatomic05
> -SUBDIRS += smpatomic06
> -SUBDIRS += smpatomic07
> SUBDIRS += smpatomic08
> endif
> SUBDIRS += smplock01
> diff --git a/testsuites/smptests/configure.ac b/testsuites/smptests/configure.ac
> index 05b9056..35f704d 100644
> --- a/testsuites/smptests/configure.ac
> +++ b/testsuites/smptests/configure.ac
> @@ -46,13 +46,6 @@ smp06/Makefile
> smp07/Makefile
> smp08/Makefile
> smp09/Makefile
> -smpatomic01/Makefile
> -smpatomic02/Makefile
> -smpatomic03/Makefile
> -smpatomic04/Makefile
> -smpatomic05/Makefile
> -smpatomic06/Makefile
> -smpatomic07/Makefile
> smpatomic08/Makefile
> smplock01/Makefile
> smpmigration01/Makefile
> diff --git a/testsuites/smptests/smpatomic01/Makefile.am b/testsuites/smptests/smpatomic01/Makefile.am
> deleted file mode 100644
> index 7bd5502..0000000
> --- a/testsuites/smptests/smpatomic01/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic01
> -smpatomic01_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic01.scn
> -dist_rtems_tests_DATA += smpatomic01.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic01_OBJECTS)
> -LINK_LIBS = $(smpatomic01_LDLIBS)
> -
> -smpatomic01$(EXEEXT): $(smpatomic01_OBJECTS) $(smpatomic01_DEPENDENCIES)
> - @rm -f smpatomic01$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic01/init.c b/testsuites/smptests/smpatomic01/init.c
> deleted file mode 100644
> index f7dfa11..0000000
> --- a/testsuites/smptests/smpatomic01/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic01 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic01 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic01/smpatomic01.doc b/testsuites/smptests/smpatomic01/smpatomic01.doc
> deleted file mode 100644
> index 3d83245..0000000
> --- a/testsuites/smptests/smpatomic01/smpatomic01.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: smpatomic01
> -
> -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/smptests/smpatomic01/smpatomic01.scn b/testsuites/smptests/smpatomic01/smpatomic01.scn
> deleted file mode 100644
> index dba0d5c..0000000
> --- a/testsuites/smptests/smpatomic01/smpatomic01.scn
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -*** SMPatomic01 TEST ***
> -
> -CPU1 _Atomic_Load_int: SUCCESS
> -
> -CPU2 _Atomic_Load_int: SUCCESS
> -
> -CPU3 _Atomic_Load_int: SUCCESS
> -
> -CPU1 _Atomic_Load_long: SUCCESS
> -
> -CPU2 _Atomic_Load_long: SUCCESS
> -
> -CPU3 _Atomic_Load_long: SUCCESS
> -
> -CPU1 _Atomic_Load_ptr: SUCCESS
> -
> -CPU3 _Atomic_Load_ptr: SUCCESS
> -
> -CPU2 _Atomic_Load_ptr: SUCCESS
> -
> -CPU1 _Atomic_Load_32: SUCCESS
> -
> -CPU2 _Atomic_Load_32: SUCCESS
> -
> -CPU3 _Atomic_Load_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic01 ***
> diff --git a/testsuites/smptests/smpatomic01/system.h b/testsuites/smptests/smpatomic01/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic01/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic01/tasks.c b/testsuites/smptests/smpatomic01/tasks.c
> deleted file mode 100644
> index 4dd2ff6..0000000
> --- a/testsuites/smptests/smpatomic01/tasks.c
> +++ /dev/null
> @@ -1,73 +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, cpuid, 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); \
> - } \
> - locked_printf("\nCPU%d Atomic_Load_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_LOAD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_LOAD_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test acquire barrier */
> - ATOMIC_LOAD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - ATOMIC_LOAD_NO_BARRIER(ptr, Pointer, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> -// ATOMIC_LOAD_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
> diff --git a/testsuites/smptests/smpatomic02/Makefile.am b/testsuites/smptests/smpatomic02/Makefile.am
> deleted file mode 100644
> index 04fc5e4..0000000
> --- a/testsuites/smptests/smpatomic02/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic02
> -smpatomic02_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic02.scn
> -dist_rtems_tests_DATA += smpatomic02.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic02_OBJECTS)
> -LINK_LIBS = $(smpatomic02_LDLIBS)
> -
> -smpatomic02$(EXEEXT): $(smpatomic02_OBJECTS) $(smpatomic02_DEPENDENCIES)
> - @rm -f smpatomic01$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic02/init.c b/testsuites/smptests/smpatomic02/init.c
> deleted file mode 100644
> index 9e0da4b..0000000
> --- a/testsuites/smptests/smpatomic02/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic02 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic02 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic02/smpatomic02.doc b/testsuites/smptests/smpatomic02/smpatomic02.doc
> deleted file mode 100644
> index d1ab4f5..0000000
> --- a/testsuites/smptests/smpatomic02/smpatomic02.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: smpatomic02
> -
> -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/smptests/smpatomic02/smpatomic02.scn b/testsuites/smptests/smpatomic02/smpatomic02.scn
> deleted file mode 100644
> index de8fe2c..0000000
> --- a/testsuites/smptests/smpatomic02/smpatomic02.scn
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -*** SMPatomic02 TEST ***
> -
> -CPU1 _Atomic_Store_int: SUCCESS
> -
> -CPU2 _Atomic_Store_int: SUCCESS
> -
> -CPU3 _Atomic_Store_int: SUCCESS
> -
> -CPU1 _Atomic_Store_long: SUCCESS
> -
> -CPU2 _Atomic_Store_long: SUCCESS
> -
> -CPU3 _Atomic_Store_long: SUCCESS
> -
> -CPU1 _Atomic_Store_ptr: SUCCESS
> -
> -CPU3 _Atomic_Store_ptr: SUCCESS
> -
> -CPU2 _Atomic_Store_ptr: SUCCESS
> -
> -CPU1 _Atomic_Store_32: SUCCESS
> -
> -CPU2 _Atomic_Store_32: SUCCESS
> -
> -CPU3 _Atomic_Store_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic02 ***
> diff --git a/testsuites/smptests/smpatomic02/system.h b/testsuites/smptests/smpatomic02/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic02/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic02/tasks.c b/testsuites/smptests/smpatomic02/tasks.c
> deleted file mode 100644
> index c5c9ba5..0000000
> --- a/testsuites/smptests/smpatomic02/tasks.c
> +++ /dev/null
> @@ -1,73 +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, cpuid, 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, ATOMIC_ORDER_ACQUIRE); \
> - rtems_test_assert(a == b); \
> - } \
> - locked_printf("\nCPU%d Atomic_Store_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_STORE_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_STORE_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test release barrier */
> - ATOMIC_STORE_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> - ATOMIC_STORE_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> -// ATOMIC_STORE_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
> diff --git a/testsuites/smptests/smpatomic03/Makefile.am b/testsuites/smptests/smpatomic03/Makefile.am
> deleted file mode 100644
> index cebd323..0000000
> --- a/testsuites/smptests/smpatomic03/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic03
> -smpatomic03_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic03.scn
> -dist_rtems_tests_DATA += smpatomic03.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic03_OBJECTS)
> -LINK_LIBS = $(smpatomic03_LDLIBS)
> -
> -smpatomic03$(EXEEXT): $(smpatomic03_OBJECTS) $(smpatomic03_DEPENDENCIES)
> - @rm -f smpatomic03$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic03/init.c b/testsuites/smptests/smpatomic03/init.c
> deleted file mode 100644
> index bf5b2a0..0000000
> --- a/testsuites/smptests/smpatomic03/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic03 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic03 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic03/smpatomic03.doc b/testsuites/smptests/smpatomic03/smpatomic03.doc
> deleted file mode 100644
> index d70a37c..0000000
> --- a/testsuites/smptests/smpatomic03/smpatomic03.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: smpatomic03
> -
> -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/smptests/smpatomic03/smpatomic03.scn b/testsuites/smptests/smpatomic03/smpatomic03.scn
> deleted file mode 100644
> index 92d3846..0000000
> --- a/testsuites/smptests/smpatomic03/smpatomic03.scn
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -*** SMPatomic03 TEST ***
> -
> -CPU2 _Atomic_Fetch_add_int: SUCCESS
> -
> -CPU1 _Atomic_Fetch_add_int: SUCCESS
> -
> -CPU3 _Atomic_Fetch_add_int: SUCCESS
> -
> -CPU2 _Atomic_Fetch_add_long: SUCCESS
> -
> -CPU2 _Atomic_Fetch_add_ptr: SUCCESS
> -
> -CPU3 _Atomic_Fetch_add_long: SUCCESS
> -
> -CPU1 _Atomic_Fetch_add_long: SUCCESS
> -
> -CPU1 _Atomic_Fetch_add_ptr: SUCCESS
> -
> -CPU2 _Atomic_Fetch_add_32: SUCCESS
> -
> -CPU3 _Atomic_Fetch_add_ptr: SUCCESS
> -
> -CPU1 _Atomic_Fetch_add_32: SUCCESS
> -
> -CPU3 _Atomic_Fetch_add_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic03 ***
> -
> diff --git a/testsuites/smptests/smpatomic03/system.h b/testsuites/smptests/smpatomic03/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic03/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic03/tasks.c b/testsuites/smptests/smpatomic03/tasks.c
> deleted file mode 100644
> index 5010549..0000000
> --- a/testsuites/smptests/smpatomic03/tasks.c
> +++ /dev/null
> @@ -1,81 +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, cpuid, 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_RELEASE); \
> - _Atomic_Fetch_add_##NAME(&t, b, mem_bar); \
> - c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE); \
> - rtems_test_assert(c == (R_TYPE)(a + b)); \
> - } \
> - locked_printf("\nCPU%d Atomic_Fetch_add_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_FETCH_ADD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_FETCH_ADD_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test acquire barrier */
> - ATOMIC_FETCH_ADD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - ATOMIC_FETCH_ADD_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - /* test release barrier */
> - ATOMIC_FETCH_ADD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> - ATOMIC_FETCH_ADD_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> -// ATOMIC_FETCH_ADD_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
> diff --git a/testsuites/smptests/smpatomic04/Makefile.am b/testsuites/smptests/smpatomic04/Makefile.am
> deleted file mode 100644
> index 6b71e10..0000000
> --- a/testsuites/smptests/smpatomic04/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic04
> -smpatomic04_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic04.scn
> -dist_rtems_tests_DATA += smpatomic04.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic04_OBJECTS)
> -LINK_LIBS = $(smpatomic04_LDLIBS)
> -
> -smpatomic04$(EXEEXT): $(smpatomic04_OBJECTS) $(smpatomic04_DEPENDENCIES)
> - @rm -f smpatomic04$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic04/init.c b/testsuites/smptests/smpatomic04/init.c
> deleted file mode 100644
> index 8398515..0000000
> --- a/testsuites/smptests/smpatomic04/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic04 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic04 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic04/smpatomic04.doc b/testsuites/smptests/smpatomic04/smpatomic04.doc
> deleted file mode 100644
> index afa91ba..0000000
> --- a/testsuites/smptests/smpatomic04/smpatomic04.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: smpatomic04
> -
> -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/smptests/smpatomic04/smpatomic04.scn b/testsuites/smptests/smpatomic04/smpatomic04.scn
> deleted file mode 100644
> index a47d27d..0000000
> --- a/testsuites/smptests/smpatomic04/smpatomic04.scn
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -*** SMPatomic04 TEST ***
> -
> -CPU2 _Atomic_Fetch_sub_int: SUCCESS
> -
> -CPU1 _Atomic_Fetch_sub_int: SUCCESS
> -
> -CPU3 _Atomic_Fetch_sub_int: SUCCESS
> -
> -CPU2 _Atomic_Fetch_sub_long: SUCCESS
> -
> -CPU3 _Atomic_Fetch_sub_long: SUCCESS
> -
> -CPU1 _Atomic_Fetch_sub_long: SUCCESS
> -
> -CPU3 _Atomic_Fetch_sub_ptr: SUCCESS
> -
> -CPU1 _Atomic_Fetch_sub_ptr: SUCCESS
> -
> -CPU2 _Atomic_Fetch_sub_ptr: SUCCESS
> -
> -CPU3 _Atomic_Fetch_sub_32: SUCCESS
> -
> -CPU1 _Atomic_Fetch_sub_32: SUCCESS
> -
> -CPU2 _Atomic_Fetch_sub_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic04 ***
> -
> diff --git a/testsuites/smptests/smpatomic04/system.h b/testsuites/smptests/smpatomic04/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic04/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic04/tasks.c b/testsuites/smptests/smpatomic04/tasks.c
> deleted file mode 100644
> index 18632cd..0000000
> --- a/testsuites/smptests/smpatomic04/tasks.c
> +++ /dev/null
> @@ -1,81 +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, cpuid, 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_RELEASE); \
> - _Atomic_Fetch_sub_##NAME(&t, b, mem_bar); \
> - c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE); \
> - rtems_test_assert(c == (R_TYPE)(a - b)); \
> - } \
> - locked_printf("\nCPU%d Atomic_Fetch_sub_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_FETCH_SUB_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_FETCH_SUB_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test acquire barrier */
> - ATOMIC_FETCH_SUB_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - ATOMIC_FETCH_SUB_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - /* test release barrier */
> - ATOMIC_FETCH_SUB_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> - ATOMIC_FETCH_SUB_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> -// ATOMIC_FETCH_SUB_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
> diff --git a/testsuites/smptests/smpatomic05/Makefile.am b/testsuites/smptests/smpatomic05/Makefile.am
> deleted file mode 100644
> index 0d4489d..0000000
> --- a/testsuites/smptests/smpatomic05/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic05
> -smpatomic05_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic05.scn
> -dist_rtems_tests_DATA += smpatomic05.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic05_OBJECTS)
> -LINK_LIBS = $(smpatomic05_LDLIBS)
> -
> -smpatomic05$(EXEEXT): $(smpatomic05_OBJECTS) $(smpatomic05_DEPENDENCIES)
> - @rm -f smpatomic05$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic05/init.c b/testsuites/smptests/smpatomic05/init.c
> deleted file mode 100644
> index 9a1947e..0000000
> --- a/testsuites/smptests/smpatomic05/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic05 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic05 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic05/smpatomic05.doc b/testsuites/smptests/smpatomic05/smpatomic05.doc
> deleted file mode 100644
> index 9ef47b1..0000000
> --- a/testsuites/smptests/smpatomic05/smpatomic05.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: smpatomic05
> -
> -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/smptests/smpatomic05/smpatomic05.scn b/testsuites/smptests/smpatomic05/smpatomic05.scn
> deleted file mode 100644
> index f297e3c..0000000
> --- a/testsuites/smptests/smpatomic05/smpatomic05.scn
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -*** SMPatomic05 TEST ***
> -
> -CPU2 _Atomic_Fetch_and_int: SUCCESS
> -
> -CPU3 _Atomic_Fetch_and_int: SUCCESS
> -
> -CPU1 _Atomic_Fetch_and_int: SUCCESS
> -
> -CPU2 _Atomic_Fetch_and_long: SUCCESS
> -
> -CPU2 _Atomic_Fetch_and_ptr: SUCCESS
> -
> -CPU3 _Atomic_Fetch_and_long: SUCCESS
> -
> -CPU1 _Atomic_Fetch_and_long: SUCCESS
> -
> -CPU2 _Atomic_Fetch_and_32: SUCCESS
> -
> -CPU3 _Atomic_Fetch_and_ptr: SUCCESS
> -
> -CPU1 _Atomic_Fetch_and_ptr: SUCCESS
> -
> -CPU3 _Atomic_Fetch_and_32: SUCCESS
> -
> -CPU1 _Atomic_Fetch_and_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic05 ***
> -
> diff --git a/testsuites/smptests/smpatomic05/system.h b/testsuites/smptests/smpatomic05/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic05/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic05/tasks.c b/testsuites/smptests/smpatomic05/tasks.c
> deleted file mode 100644
> index cf41cc1..0000000
> --- a/testsuites/smptests/smpatomic05/tasks.c
> +++ /dev/null
> @@ -1,81 +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, cpuid, 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_RELEASE); \
> - _Atomic_Fetch_and_##NAME(&t, b, mem_bar); \
> - c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE); \
> - rtems_test_assert(c == (R_TYPE)(a & b)); \
> - } \
> - locked_printf("\nCPU%d Atomic_Fetch_and_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_FETCH_AND_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_FETCH_AND_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test acquire barrier */
> - ATOMIC_FETCH_AND_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - ATOMIC_FETCH_AND_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - /* test release barrier */
> - ATOMIC_FETCH_AND_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> - ATOMIC_FETCH_AND_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> -// ATOMIC_FETCH_AND_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
> diff --git a/testsuites/smptests/smpatomic06/Makefile.am b/testsuites/smptests/smpatomic06/Makefile.am
> deleted file mode 100644
> index c3a0645..0000000
> --- a/testsuites/smptests/smpatomic06/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic06
> -smpatomic06_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic06.scn
> -dist_rtems_tests_DATA += smpatomic06.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic06_OBJECTS)
> -LINK_LIBS = $(smpatomic06_LDLIBS)
> -
> -smpatomic06$(EXEEXT): $(smpatomic06_OBJECTS) $(smpatomic06_DEPENDENCIES)
> - @rm -f smpatomic06$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic06/init.c b/testsuites/smptests/smpatomic06/init.c
> deleted file mode 100644
> index 06f1f61..0000000
> --- a/testsuites/smptests/smpatomic06/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic06 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic06 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic06/smpatomic06.doc b/testsuites/smptests/smpatomic06/smpatomic06.doc
> deleted file mode 100644
> index 8c9e85f..0000000
> --- a/testsuites/smptests/smpatomic06/smpatomic06.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: smpatomic06
> -
> -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/smptests/smpatomic06/smpatomic06.scn b/testsuites/smptests/smpatomic06/smpatomic06.scn
> deleted file mode 100644
> index 70a606e..0000000
> --- a/testsuites/smptests/smpatomic06/smpatomic06.scn
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -*** SMPatomic06 TEST ***
> -
> -CPU2 _Atomic_Fetch_or_int: SUCCESS
> -
> -CPU2 _Atomic_Fetch_or_long: SUCCESS
> -
> -CPU3 _Atomic_Fetch_or_int: SUCCESS
> -
> -CPU1 _Atomic_Fetch_or_int: SUCCESS
> -
> -CPU2 _Atomic_Fetch_or_ptr: SUCCESS
> -
> -CPU3 _Atomic_Fetch_or_long: SUCCESS
> -
> -CPU2 _Atomic_Fetch_or_32: SUCCESS
> -
> -CPU1 _Atomic_Fetch_or_long: SUCCESS
> -
> -CPU3 _Atomic_Fetch_or_ptr: SUCCESS
> -
> -CPU1 _Atomic_Fetch_or_ptr: SUCCESS
> -
> -CPU3 _Atomic_Fetch_or_32: SUCCESS
> -
> -CPU1 _Atomic_Fetch_or_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic06 ***
> -
> diff --git a/testsuites/smptests/smpatomic06/system.h b/testsuites/smptests/smpatomic06/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic06/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic06/tasks.c b/testsuites/smptests/smpatomic06/tasks.c
> deleted file mode 100644
> index a0409c7..0000000
> --- a/testsuites/smptests/smpatomic06/tasks.c
> +++ /dev/null
> @@ -1,81 +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, cpuid, 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_RELEASE); \
> - _Atomic_Fetch_or_##NAME(&t, b, mem_bar); \
> - c = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE); \
> - rtems_test_assert(c == (R_TYPE)(a | b)); \
> - } \
> - locked_printf("\nCPU%d Atomic_Fetch_or_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_FETCH_OR_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_FETCH_OR_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test acquire barrier */
> - ATOMIC_FETCH_OR_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - ATOMIC_FETCH_OR_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - /* test release barrier */
> - ATOMIC_FETCH_OR_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> - ATOMIC_FETCH_OR_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> -// ATOMIC_FETCH_OR_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
> diff --git a/testsuites/smptests/smpatomic07/Makefile.am b/testsuites/smptests/smpatomic07/Makefile.am
> deleted file mode 100644
> index 5e623ea..0000000
> --- a/testsuites/smptests/smpatomic07/Makefile.am
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -rtems_tests_PROGRAMS = smpatomic07
> -smpatomic07_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c
> -
> -dist_rtems_tests_DATA = smpatomic07.scn
> -dist_rtems_tests_DATA += smpatomic07.doc
> -
> -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
> -include $(top_srcdir)/../automake/compile.am
> -include $(top_srcdir)/../automake/leaf.am
> -
> -AM_CPPFLAGS += -I$(top_srcdir)/../support/include
> -
> -LINK_OBJS = $(smpatomic07_OBJECTS)
> -LINK_LIBS = $(smpatomic07_LDLIBS)
> -
> -smpatomic07$(EXEEXT): $(smpatomic07_OBJECTS) $(smpatomic07_DEPENDENCIES)
> - @rm -f smpatomic07$(EXEEXT)
> - $(make-exe)
> -
> -include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/smptests/smpatomic07/init.c b/testsuites/smptests/smpatomic07/init.c
> deleted file mode 100644
> index be9c216..0000000
> --- a/testsuites/smptests/smpatomic07/init.c
> +++ /dev/null
> @@ -1,72 +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;
> - bool allDone;
> -
> - /* XXX - Delay a bit to allow debug messages from
> - * startup to print. This may need to go away when
> - * debug messages go away.
> - */
> - locked_print_initialize();
> -
> - /* Put start of test message */
> - locked_printf( "\n\n*** SMPatomic07 TEST ***\n" );
> -
> - /* Initialize the TaskRan array */
> - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
> - TaskRan[i] = false;
> - }
> -
> - /* Create and start tasks for each processor */
> - for ( i=1; i< rtems_smp_get_processor_count() ; 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+1 );
> - directive_failed( status, "task start" );
> - }
> -
> - /* Wait on the all tasks to run */
> - while (1) {
> - allDone = true;
> - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) {
> - if (TaskRan[i] == false)
> - allDone = false;
> - }
> - if (allDone) {
> - locked_printf( "\n\n*** END OF TEST SMPatomic07 ***\n" );
> - rtems_test_exit( 0 );
> - }
> - }
> -}
> diff --git a/testsuites/smptests/smpatomic07/smpatomic07.doc b/testsuites/smptests/smpatomic07/smpatomic07.doc
> deleted file mode 100644
> index a931ad5..0000000
> --- a/testsuites/smptests/smpatomic07/smpatomic07.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: smpatomic07
> -
> -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/smptests/smpatomic07/smpatomic07.scn b/testsuites/smptests/smpatomic07/smpatomic07.scn
> deleted file mode 100644
> index 800c4c5..0000000
> --- a/testsuites/smptests/smpatomic07/smpatomic07.scn
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -*** SMPatomic07 TEST ***
> -
> -CPU1 _Atomic_Compare_exchange_int: SUCCESS
> -
> -CPU3 _Atomic_Compare_exchange_int: SUCCESS
> -
> -CPU2 _Atomic_Compare_exchange_int: SUCCESS
> -
> -CPU2 _Atomic_Compare_exchange_long: SUCCESS
> -
> -CPU2 _Atomic_Compare_exchange_ptr: SUCCESS
> -
> -CPU2 _Atomic_Compare_exchange_32: SUCCESS
> -
> -CPU3 _Atomic_Compare_exchange_long: SUCCESS
> -
> -CPU1 _Atomic_Compare_exchange_long: SUCCESS
> -
> -CPU1 _Atomic_Compare_exchange_ptr: SUCCESS
> -
> -CPU3 _Atomic_Compare_exchange_ptr: SUCCESS
> -
> -CPU1 _Atomic_Compare_exchange_32: SUCCESS
> -
> -CPU3 _Atomic_Compare_exchange_32: SUCCESS
> -
> -
> -*** END OF TEST SMPatomic07 ***
> -
> diff --git a/testsuites/smptests/smpatomic07/system.h b/testsuites/smptests/smpatomic07/system.h
> deleted file mode 100644
> index da314a2..0000000
> --- a/testsuites/smptests/smpatomic07/system.h
> +++ /dev/null
> @@ -1,50 +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
> -);
> -
> -/* configuration information */
> -
> -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
> -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> -
> -#define CONFIGURE_SMP_APPLICATION
> -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
> -
> -#define CONFIGURE_MAXIMUM_TASKS \
> - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
> -
> -#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[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ];
> -
> -/*
> - * Handy macros and static inline functions
> - */
> -
> -/* end of include file */
> diff --git a/testsuites/smptests/smpatomic07/tasks.c b/testsuites/smptests/smpatomic07/tasks.c
> deleted file mode 100644
> index 345439b..0000000
> --- a/testsuites/smptests/smpatomic07/tasks.c
> +++ /dev/null
> @@ -1,97 +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, cpuid, 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_RELEASE); \
> - b = a + 1; \
> - r = _Atomic_Compare_exchange_##NAME(&t, &b, a - 1, mem_bar, memory_order_relaxed);\
> - if(r != 0){ \
> - locked_printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": FAILED\n", (unsigned int)cpuid); \
> - rtems_test_exit( 0 ); \
> - } \
> - _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELEASE); \
> - r = _Atomic_Compare_exchange_##NAME(&t, &a, a - 1, mem_bar, memory_order_relaxed);\
> - b = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE); \
> - if((r == 0) ||((r != 0) && ((a - 1) != b))){ \
> - locked_printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": FAILED\n", (unsigned int)cpuid); \
> - rtems_test_exit( 0 ); \
> - } \
> - _Atomic_Store_##NAME(&t, a, ATOMIC_ORDER_RELEASE); \
> - b = a + 1; \
> - r = _Atomic_Compare_exchange_##NAME(&t, &b, a, mem_bar, memory_order_relaxed); \
> - if(r != 0){ \
> - locked_printf("\ntask%d: Atomic_Compare_exchange_" #NAME ": FAILED\n", (unsigned int)cpuid); \
> - rtems_test_exit( 0 ); \
> - } \
> - } \
> - locked_printf("\nCPU%d Atomic_Compare_exchange_" #NAME ": SUCCESS\n", cpuid); \
> -}
> -
> -rtems_task Test_task(
> - rtems_task_argument argument
> - )
> -{
> - uint32_t cpu_num;
> - char name[5];
> - char *p;
> -
> - /* Get the task name */
> - p = rtems_object_get_name( RTEMS_SELF, 5, name );
> - rtems_test_assert( p != NULL );
> -
> - /* Get the CPU Number */
> - cpu_num = rtems_smp_get_current_processor();
> -
> - /* Print that the task is up and running. */
> - /* test relaxed barrier */
> - ATOMIC_CAS_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - ATOMIC_CAS_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED);
> -
> - /* test acquire barrier */
> - ATOMIC_CAS_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - ATOMIC_CAS_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_ACQUIRE);
> -
> - /* test release barrier */
> - ATOMIC_CAS_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> - ATOMIC_CAS_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELEASE);
> -
> -// ATOMIC_CAS_NO_BARRIER(64, cpu_num);
> -
> - /* Set the flag that the task is up and running */
> - TaskRan[cpu_num] = true;
> -
> - /* Drop into a loop which will keep this task on
> - * running on the cpu.
> - */
> - while(1);
> -}
>
> _______________________________________________
> rtems-vc mailing list
> rtems-vc at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-vc
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list