From 8aa69b59440fc4d8802fb602aeace6d5d68a22e5 Mon Sep 17 00:00:00 2001 From: Evgeniy Moiseenko Date: Mon, 20 Jan 2025 16:19:39 +0100 Subject: [PATCH] Add missing barriers in litmus test runner (#25) * add missing barrier in litmus test runner --------- Signed-off-by: Evgeniy Moiseenko --- .../commonMain/kotlin/org/jetbrains/litmuskt/ThreadlikeRunner.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/commonMain/kotlin/org/jetbrains/litmuskt/ThreadlikeRunner.kt b/core/src/commonMain/kotlin/org/jetbrains/litmuskt/ThreadlikeRunner.kt index df40953..0b66e66 100644 --- a/core/src/commonMain/kotlin/org/jetbrains/litmuskt/ThreadlikeRunner.kt +++ b/core/src/commonMain/kotlin/org/jetbrains/litmuskt/ThreadlikeRunner.kt @@ -13,6 +13,7 @@ abstract class ThreadlikeRunner : LitmusRunner() { // performance optimizations: // 1) each thread takes a portion of states and calculates stats for it // 2) each thread then resets these states + barrier.await() rangeResult = calcStats(states.view(resultCalcRange), test.outcomeSpec, test.outcomeFinalizer) val resetFunction = test.resetFunction for (i in resultCalcRange) states[i].resetFunction()