Message ID | 1416868730-26140-5-git-send-email-ola.liljedahl@linaro.org |
---|---|
State | Accepted |
Commit | 9fe348ddad05e929e9a51dc4e5fe3a54b3d46e9c |
Headers | show |
diff --git a/platform/linux-generic/odp_barrier.c b/platform/linux-generic/odp_barrier.c index 87be2a1..de1bf60 100644 --- a/platform/linux-generic/odp_barrier.c +++ b/platform/linux-generic/odp_barrier.c @@ -33,8 +33,8 @@ void odp_barrier_wait(odp_barrier_t *barrier) uint32_t count; int wasless; - odp_sync_stores(); wasless = barrier->bar < barrier->count; + __atomic_thread_fence(__ATOMIC_SEQ_CST); count = odp_atomic_fetch_inc_u32(&barrier->bar); if (count == 2*barrier->count-1) { @@ -44,5 +44,5 @@ void odp_barrier_wait(odp_barrier_t *barrier) odp_spin(); } - odp_mem_barrier(); + __atomic_thread_fence(__ATOMIC_SEQ_CST); }
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> --- Updated to use GCC __atomic barriers. Restored missing line. platform/linux-generic/odp_barrier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)