~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/multi_thread/multi_thread.cc

  • Committer: Brian Aker
  • Date: 2009-03-12 20:00:28 UTC
  • mfrom: (929.1.7 merge)
  • Revision ID: brian@tangent.org-20090312200028-lqywwjv6p5kwin1w
Merge from Brian (dead code in parser, change default scheduler)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
  safe_mutex_assert_owner(&LOCK_thread_count);
36
36
  thread_count++;
 
37
  threads.append(session);
37
38
  (void) pthread_mutex_unlock(&LOCK_thread_count);
38
39
 
39
40
  if ((error= pthread_create(&session->real_id, &multi_thread_attrib, handle_one_connection, (void*) session)))
75
76
  /* Parameter for threads created for connections */
76
77
  (void) pthread_attr_init(&multi_thread_attrib);
77
78
  (void) pthread_attr_setdetachstate(&multi_thread_attrib,
78
 
                                     PTHREAD_CREATE_DETACHED);
 
79
                                     PTHREAD_CREATE_DETACHED);
79
80
  pthread_attr_setscope(&multi_thread_attrib, PTHREAD_SCOPE_SYSTEM);
 
81
  {
 
82
    struct sched_param tmp_sched_param;
 
83
 
 
84
    memset(&tmp_sched_param, 0, sizeof(tmp_sched_param));
 
85
    tmp_sched_param.sched_priority= WAIT_PRIOR;
 
86
    (void)pthread_attr_setschedparam(&multi_thread_attrib, &tmp_sched_param);
 
87
  }
80
88
 
81
89
  return 0;
82
90
}