This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] testsuite: pthread_cond_wait.exp: Avoid a race
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 12 Feb 2013 09:23:01 -0800
- Subject: Re: [patch] testsuite: pthread_cond_wait.exp: Avoid a race
- References: <20130212170358.GA5633@host2.jankratochvil.net>
> It is just too racy. I will check in the easy workaround below, it is
> sure not a real fix.
2 seconds feels much much much too long, however. I try to avoid
these types of delays, because collectively they make a significant
dent on the overall amount of time it takes to run the testsuite.
I am trying to think of a way to rewrite the program to avoid
the delay entirely, but I don't think it's possible, because
we need to the thread to run until it blocks in pthread_cond_wait.
Can we try a smaller value? For instance, if we went from 0.01
second to 0.1 seconds, we'd increase the time by a factor of 10.
In today's CPU times, 0.1 second enough to do a huge amount of
processing, no?
--
Joel