From 312c647a6e624e5e77b26303e400a183a172a0d6 Mon Sep 17 00:00:00 2001 From: Dejan Jevtic Date: Fri, 6 Dec 2013 14:21:44 +0000 Subject: [PATCH] mips32/mips64: Suppress race condition error. On MIPS architecture helgrind is showing race condition error in printf if the printf is first time called from the child thread. If we call printf from the main for the first time we will suppress this error on mips. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13749 --- helgrind/tests/tc21_pthonce.c | 1 + helgrind/tests/tc21_pthonce.stderr.exp | 4 ++-- helgrind/tests/tc21_pthonce.stdout.exp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/helgrind/tests/tc21_pthonce.c b/helgrind/tests/tc21_pthonce.c index 69fac769f..1cc6d32c3 100644 --- a/helgrind/tests/tc21_pthonce.c +++ b/helgrind/tests/tc21_pthonce.c @@ -81,6 +81,7 @@ int main ( void ) { id_arg = (int *)malloc(NUM_THREADS*sizeof(int)); + printf("main: Hello\n"); for (i = 0; i < NUM_THREADS; i++) { id_arg[i] = i; r= pthread_create(&threads[i], NULL, child, &id_arg[i]); diff --git a/helgrind/tests/tc21_pthonce.stderr.exp b/helgrind/tests/tc21_pthonce.stderr.exp index 700b49207..bc5604f8d 100644 --- a/helgrind/tests/tc21_pthonce.stderr.exp +++ b/helgrind/tests/tc21_pthonce.stderr.exp @@ -5,7 +5,7 @@ Thread #x was created ... by 0x........: pthread_create_WRK (hg_intercepts.c:...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (tc21_pthonce.c:86) + by 0x........: main (tc21_pthonce.c:87) ---Thread-Announcement------------------------------------------ @@ -13,7 +13,7 @@ Thread #x was created ... by 0x........: pthread_create_WRK (hg_intercepts.c:...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (tc21_pthonce.c:86) + by 0x........: main (tc21_pthonce.c:87) ---------------------------------------------------------------- diff --git a/helgrind/tests/tc21_pthonce.stdout.exp b/helgrind/tests/tc21_pthonce.stdout.exp index e6c2dc225..5b45785d3 100644 --- a/helgrind/tests/tc21_pthonce.stdout.exp +++ b/helgrind/tests/tc21_pthonce.stdout.exp @@ -1,3 +1,4 @@ +main: Hello welcome: Welcome child: Hi, I'm thread 0 child: Hi, I'm thread 1