summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpatomic01/tasks.c
diff options
context:
space:
mode:
authorWeiY <wei.a.yang@gmail.com>2013-09-28 14:54:37 +0800
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-08 16:07:21 +0200
commit27a034ef13e70493eb8457821b87346ee96ee4f8 (patch)
tree324fdcb4ee0a3bc29e0642fd176c779a2f87daab /testsuites/smptests/smpatomic01/tasks.c
parentadd simple atomic test cases into smpatomic08 (diff)
downloadrtems-27a034ef13e70493eb8457821b87346ee96ee4f8.tar.bz2
delete smpatomic0-7 test cases
Diffstat (limited to '')
-rw-r--r--testsuites/smptests/smpatomic01/tasks.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/testsuites/smptests/smpatomic01/tasks.c b/testsuites/smptests/smpatomic01/tasks.c
deleted file mode 100644
index 4dd2ff68d3..0000000000
--- 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);
-}