|
From: <sv...@va...> - 2011-07-28 17:53:36
|
Author: bart
Date: 2011-07-28 18:48:48 +0100 (Thu, 28 Jul 2011)
New Revision: 11932
Log:
Yet another regression test scheduling sensitivity fix
Modified:
trunk/helgrind/tests/tc05_simple_race.c
Modified: trunk/helgrind/tests/tc05_simple_race.c
===================================================================
--- trunk/helgrind/tests/tc05_simple_race.c 2011-07-28 17:41:49 UTC (rev 11931)
+++ trunk/helgrind/tests/tc05_simple_race.c 2011-07-28 17:48:48 UTC (rev 11932)
@@ -22,13 +22,13 @@
int main ( void )
{
+ const struct timespec delay = { 0, 100 * 1000 * 1000 };
pthread_t child;
-
if (pthread_create(&child, NULL, child_fn, NULL)) {
perror("pthread_create");
exit(1);
}
-
+ nanosleep(&delay, 0);
/* "Thread 1" in the paper */
y = y + 1;
pthread_mutex_lock( &mu );
|