int *res = &threadctrl.retval;
void *res = &threadctrl.retval;
main (void){  struct thr_ctrl threadctrl;  pthread_t thread;  int err;  int *res = &threadctrl.retval;  pthread_mutexattr_t mutattr;  pthread_mutexattr_init (&mutattr);  pthread_mutex_init (&threadctrl.mutex, &mutattr);  pthread_cond_init (&threadctrl.cond, NULL);  err = pthread_mutex_lock (&threadctrl.mutex);  if (err)    printf ("mutex_lock : %s\n", strerror (err));  dump_mut (&threadctrl.mutex);  pthread_create (&thread, NULL, thread_start, &threadctrl);  /* Wait until it's ready.  */  err = pthread_cond_wait (&threadctrl.cond, &threadctrl.mutex);  if (err)    printf ("cond_wait  : %s\n", strerror (err));  /* Now, we should have acquired the mutex again!  */  dump_mut (&threadctrl.mutex);  sleep (1);  dump_mut (&threadctrl.mutex);  err = pthread_cond_wait (&threadctrl.cond, &threadctrl.mutex);  if (err)    {      printf ("cond_wait  : %s\n", strerror (err));      printf ("ERROR\n");      abort ();    };  dump_mut (&threadctrl.mutex);  pthread_join (thread, (void **) &res);  printf ("OK\n");  return 0;}