~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/mysqld.cc

  • Committer: Brian Aker
  • Date: 2008-06-28 05:26:20 UTC
  • Revision ID: brian@tangent.org-20080628052620-kglj1hb5cggw8h3r
Second pass on pthread cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1710
1710
  DBUG_ENTER("start_signal_handler");
1711
1711
 
1712
1712
  (void) pthread_attr_init(&thr_attr);
1713
 
  pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
1714
 
  (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
 
1713
  pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM);
 
1714
  (void) pthread_attr_setdetachstate(&thr_attr, PTHREAD_CREATE_DETACHED);
1715
1715
  if (!(opt_specialflag & SPECIAL_NO_PRIOR))
1716
 
    my_pthread_attr_setprio(&thr_attr,INTERRUPT_PRIOR);
 
1716
  {
 
1717
    struct sched_param tmp_sched_param;
 
1718
 
 
1719
    memset(&tmp_sched_param, 0, sizeof(tmp_sched_param));
 
1720
    tmp_sched_param.sched_priority= INTERRUPT_PRIOR;
 
1721
    (void)pthread_attr_setschedparam(&thr_attr, &tmp_sched_param);
 
1722
  }
1717
1723
#if defined(__ia64__) || defined(__ia64)
1718
1724
  /*
1719
1725
    Peculiar things with ia64 platforms - it seems we only have half the
1829
1835
#ifdef USE_ONE_SIGNAL_HAND
1830
1836
        pthread_t tmp;
1831
1837
        if (!(opt_specialflag & SPECIAL_NO_PRIOR))
1832
 
          my_pthread_attr_setprio(&connection_attrib,INTERRUPT_PRIOR);
 
1838
        {
 
1839
          struct sched_param tmp_sched_param;
 
1840
 
 
1841
          memset(&tmp_sched_param, 0, sizeof(tmp_sched_param));
 
1842
          tmp_sched_param.sched_priority= INTERRUPT_PRIOR;
 
1843
          (void)pthread_attr_setschedparam(&connection_attrib, &tmp_sched_param);
 
1844
        }
1833
1845
        if (pthread_create(&tmp,&connection_attrib, kill_server_thread,
1834
1846
                           (void*) &sig))
1835
1847
          sql_print_error("Can't create thread to kill server");
2501
2513
                                     PTHREAD_CREATE_DETACHED);
2502
2514
  pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM);
2503
2515
  if (!(opt_specialflag & SPECIAL_NO_PRIOR))
2504
 
    my_pthread_attr_setprio(&connection_attrib,WAIT_PRIOR);
 
2516
  {
 
2517
    struct sched_param tmp_sched_param;
 
2518
 
 
2519
    memset(&tmp_sched_param, 0, sizeof(tmp_sched_param));
 
2520
    tmp_sched_param.sched_priority= WAIT_PRIOR;
 
2521
    (void)pthread_attr_setschedparam(&connection_attrib, &tmp_sched_param);
 
2522
  }
2505
2523
 
2506
2524
  if (pthread_key_create(&THR_THD,NULL) ||
2507
2525
      pthread_key_create(&THR_MALLOC,NULL))
2918
2936
  }
2919
2937
#endif
2920
2938
 
2921
 
  (void) thr_setconcurrency(concurrency);       // 10 by default
2922
 
 
2923
2939
  select_thread=pthread_self();
2924
2940
  select_thread_in_use=1;
2925
2941
 
3273
3289
  st_vio *vio_tmp;
3274
3290
  DBUG_ENTER("handle_connections_sockets");
3275
3291
 
3276
 
  (void) my_pthread_getprio(pthread_self());            // For debugging
3277
 
 
3278
3292
  FD_ZERO(&clientFDs);
3279
3293
  if (ip_sock != INVALID_SOCKET)
3280
3294
  {