collector_timeout = MAX_PC_SAMPLES * tick / 1000 / 2;
update_waiter (u_short *sample_buffer, size_t size, size_t offset, u_int scale){  error_t err;  if (profile_thread == MACH_PORT_NULL)    {      /* Set up the profiling collector thread.  */      static void profile_waiter (void);      err = __thread_create (__mach_task_self (), &profile_thread);      if (! err)	err = __mach_setup_thread (__mach_task_self (), profile_thread,				   &profile_waiter, NULL, NULL);    }  else    err = 0;  if (! err)    {      if (sample_scale == 0)	err = __thread_resume (profile_thread);      if (! err)	{	  samples = sample_buffer;	  maxsamples = size / sizeof *sample_buffer;	  pc_offset = offset;	  sample_scale = scale;	}    }  return err;}