Skip to contentSkip to conversation

openposix: Fix (hopefully) last two failures

PATCH New Cyril Hrubis 1 participant 1 message Nov 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openposix: Fix (hopefully) last two failures

This is a continuation of:

commit 38cc030092a54067a9f08dea0173a0d032a15820

Author: Cyril Hrubis <[email protected]>
Date:   Thu Oct 29 15:16:30 2020 +0100

openposix: Fix two test failures

Hopefully this is a last two, but there may be more cases where we haven't hit compiler optimization triggering the bug yet.

Fixes 8c22a59107dc (openposix: add "static" to all global variables and functions)
---
 .../conformance/interfaces/pthread_kill/8-1.c                   | 2 +-
 .../open_posix_testsuite/conformance/interfaces/sigwait/6-1.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/8-1.c +1 -1
index f71c02c93..bc0138bd5 100644
@@ -75,7 +75,7 @@
 /***********************************    Test cases  *****************************************/
 /********************************************************************************************/
 
-static char do_it = 1;
+static volatile char do_it = 1;
 static unsigned long count_ope = 0;
 #ifdef WITH_SYNCHRO
 static sem_t semsig1;
testcases/open_posix_testsuite/conformance/interfaces/sigwait/6-1.c +1 -1
index 826eb2776..3b9004635 100644
@@ -81,7 +81,7 @@
 /***************************    Test case   ***********************************/
 /******************************************************************************/
 
-static int n_awaken = 0;
+static volatile int n_awaken = 0;
 static sigset_t setusr;
 
 /* Thread function */
Signature · 1 line
2.26.2