From f41600e66fef4481ab82fbbad89144a8a8cc0599 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 13 Apr 2020 12:34:02 +0200 Subject: [PATCH] Add a read barrier in the traversing of the buffer list Needed on systems with weak memory ordering - the inferior, partially working fix from #2544 was already removed in #2551 --- driver/others/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driver/others/memory.c b/driver/others/memory.c index a49fb1fa1..5abcbf3a4 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -2741,6 +2741,7 @@ void *blas_memory_alloc(int procpos){ LOCK_COMMAND(&alloc_lock); #endif do { + RMB; #if defined(USE_OPENMP) if (!memory[position].used) { blas_lock(&memory[position].lock);