10 int *counter
= (int *) p
;
12 enum { numarrays
= 100, numels
= 17 };
13 char *arrays
[numarrays
];
15 for (i
=0; i
<numarrays
; i
++)
18 unsigned x
= i
% numels
;
19 arrays
[i
] = calloc (numels
, sizeof(arrays
[i
][0]));
20 assert (arrays
[i
] != NULL
);
23 sched_yield (); /* sleep (1); */
35 pthread_t threads
[NT
];
42 rc
= pthread_create (& threads
[i
], NULL
, func
, (void *) & counts
[i
]);
48 rc
= pthread_join (threads
[i
], NULL
);
50 printf ("%d%s", counts
[i
], (i
==NT
-1) ? "\n" : " ");
55 /* { dg-output "100 100 100 100 100 100 100 100 100 100" } */
56 /* { dg-repetitions 20 } */
57 /* { dg-timeout 10 } */