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
This commit is contained in:
Dejan Jevtic 2013-12-06 14:21:44 +00:00
parent b330c9fa31
commit 312c647a6e
3 changed files with 4 additions and 2 deletions

View File

@ -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]);

View File

@ -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)
----------------------------------------------------------------

View File

@ -1,3 +1,4 @@
main: Hello
welcome: Welcome
child: Hi, I'm thread 0
child: Hi, I'm thread 1