diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2023-06-28 12:46:20 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2023-07-12 11:02:07 +0300 |
commit | 114321a5d89d965e99e68c0e3c07d98fcb3fd67f (patch) | |
tree | 5d6bc47a4d5cf8900445336b184fe19446a7aa67 | |
parent | f42d23801f34dc0ca0aa0463bb92bf4fdc310d8e (diff) |
validation: barrier: use new memory barriers
Call the new memory barrier functions to verify their
implementation.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
-rw-r--r-- | test/validation/api/barrier/barrier.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/validation/api/barrier/barrier.c b/test/validation/api/barrier/barrier.c index 610b5db70..e4fba770f 100644 --- a/test/validation/api/barrier/barrier.c +++ b/test/validation/api/barrier/barrier.c @@ -283,6 +283,9 @@ static void barrier_test_memory_barrier(void) volatile int b = 0; volatile int c = 0; volatile int d = 0; + volatile int e = 0; + volatile int f = 0; + volatile int g = 0; /* Call all memory barriers to verify that those are implemented */ a = 1; @@ -292,9 +295,15 @@ static void barrier_test_memory_barrier(void) c = 1; odp_mb_full(); d = 1; + odp_mb_sync(); + e = 1; + odp_mb_sync_load(); + f = 1; + odp_mb_sync_store(); + g = 1; /* Avoid "variable set but not used" warning */ - temp_result = a + b + c + d; + temp_result = a + b + c + d + e + f + g; } static int barrier_init(odp_instance_t *inst) |