|
From: <sv...@va...> - 2011-07-28 17:46:38
|
Author: bart
Date: 2011-07-28 18:41:49 +0100 (Thu, 28 Jul 2011)
New Revision: 11931
Log:
Two more scheduler sensitivity fixes for thread tool regression tests
Modified:
trunk/drd/tests/annotate_hb_race.c
trunk/helgrind/tests/tc16_byterace.c
Modified: trunk/drd/tests/annotate_hb_race.c
===================================================================
--- trunk/drd/tests/annotate_hb_race.c 2011-07-28 17:40:49 UTC (rev 11930)
+++ trunk/drd/tests/annotate_hb_race.c 2011-07-28 17:41:49 UTC (rev 11931)
@@ -32,11 +32,11 @@
U_ANNOTATE_HAPPENS_BEFORE(&s_i);
pthread_create(&tid[0], 0, thread_func, &result[0]);
- pthread_create(&tid[1], 0, thread_func, &result[1]);
+ //pthread_create(&tid[1], 0, thread_func, &result[1]);
s_i = 1;
pthread_join(tid[0], NULL);
- pthread_join(tid[1], NULL);
+ //pthread_join(tid[1], NULL);
fprintf(stderr, "Done.\n");
Modified: trunk/helgrind/tests/tc16_byterace.c
===================================================================
--- trunk/helgrind/tests/tc16_byterace.c 2011-07-28 17:40:49 UTC (rev 11930)
+++ trunk/helgrind/tests/tc16_byterace.c 2011-07-28 17:41:49 UTC (rev 11931)
@@ -16,14 +16,14 @@
int main ( void )
{
+ const struct timespec delay = { 0, 100 * 1000 * 1000 };
int i;
pthread_t child;
-
if (pthread_create(&child, NULL, child_fn, NULL)) {
perror("pthread_create");
exit(1);
}
-
+ nanosleep(&delay, 0);
/* Unprotected relative to child, but harmless, since different
bytes accessed */
for (i = 0; i < 5; i++)
|