ChangeLog:
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cell / coremaker.c
index f1754ceeb4f856cec6d3867cf9bd041aacd929f8..48ad90c9eee4761b224fac1ce5f4e659376cf75e 100644 (file)
@@ -43,18 +43,25 @@ int
 main (void)
 {
   int thread_id[nr_t];
+  pthread_attr_t attr;
   pthread_t pts[nr_t];
   spe_context_ptr_t ctx[nr_t];
   unsigned int value;
   int cnt;
 
+  /* Use small thread stacks to speed up writing out core file.  */
+  pthread_attr_init (&attr);
+  pthread_attr_setstacksize (&attr, 2*PTHREAD_STACK_MIN);
+
   for (cnt = 0; cnt < nr_t; cnt++)
     {
       ctx[cnt] = spe_context_create (0, NULL);
       thread_id[cnt]
-       = pthread_create (&pts[cnt], NULL, &spe_thread, &ctx[cnt]);
+       = pthread_create (&pts[cnt], &attr, &spe_thread, &ctx[cnt]);
     }
 
+  pthread_attr_destroy (&attr);
+
   for (cnt = 0; cnt < nr_t; cnt++)
     spe_out_intr_mbox_read (ctx[cnt], &value, 1, SPE_MBOX_ALL_BLOCKING);
 
This page took 0.030327 seconds and 4 git commands to generate.