[PATCH 1/2] correct memory model in smpatomic test case

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Aug 6 09:02:30 UTC 2013


On 2013-08-04 20:21, WeiY wrote:
> ---
>   testsuites/smptests/smpatomic01/tasks.c |    2 +-
>   testsuites/smptests/smpatomic02/tasks.c |    2 +-
>   testsuites/smptests/smpatomic03/tasks.c |    4 ++--
>   testsuites/smptests/smpatomic04/tasks.c |    4 ++--
>   testsuites/smptests/smpatomic05/tasks.c |    4 ++--
>   testsuites/smptests/smpatomic06/tasks.c |    4 ++--
>   testsuites/smptests/smpatomic07/tasks.c |    8 ++++----
>   7 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/testsuites/smptests/smpatomic01/tasks.c b/testsuites/smptests/smpatomic01/tasks.c
> index 65ad81b..2fe03ea 100644
> --- a/testsuites/smptests/smpatomic01/tasks.c
> +++ b/testsuites/smptests/smpatomic01/tasks.c
> @@ -29,7 +29,7 @@
>     for (i = 0; i < TEST_REPEAT; i++){                     \
>       b = (R_TYPE)rand();                                  \
>       atomic_init(&t, b);                                  \
> -    a = _Atomic_Load_##NAME(&t, mem_bar);                \
> +    a = _Atomic_Load_##NAME(&t, ATOMIC_ORDER_ACQUIRE);   \
>       rtems_test_assert(a == b);                           \
>     }                                                      \
>     locked_printf("\nCPU%d Atomic_Load_" #NAME ": SUCCESS\n", cpuid); \

With this change the mem_bar parameter is now unused.  I would

   o fix the macro invocation, or

   o remove the mem_bar parameter.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list