1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-28 20:21:45 +02:00

Cap the runtime for rs-race

This commit is contained in:
Arun Sharma 2010-03-10 22:57:43 -08:00
parent f8a15e9679
commit d3ddc9b96b

View file

@ -29,6 +29,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <libunwind.h> #include <libunwind.h>
#include <execinfo.h> #include <execinfo.h>
/* ITERS=1000, NTHREAD=10 caught some bugs in the past */
#ifndef ITERS
#define ITERS 100
#endif
#ifndef NTHREAD
#define NTHREAD 2
#endif
int verbose; int verbose;
void void
@ -1325,7 +1334,7 @@ void *
bar(void *p) bar(void *p)
{ {
int i; int i;
for (i = 0; i < 1000; ++i) { for (i = 0; i < ITERS; ++i) {
foo_0 (); foo_0 ();
foo_1 (); foo_1 ();
foo_2 (); foo_2 ();
@ -1459,10 +1468,6 @@ bar(void *p)
return NULL; return NULL;
} }
#ifndef NTHREAD
#define NTHREAD 10
#endif
int doit () int doit ()
{ {
pthread_t tid[NTHREAD]; pthread_t tid[NTHREAD];