~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-02-10 08:46:50 UTC
  • Revision ID: brian@tangent.org-20090210084650-msdv9hu2mzil8cbb
Remove thr_alarm

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
#define DEFAULT_SKIP_THREAD_PRIORITY 0
69
69
#endif
70
70
 
71
 
#include <mysys/thr_alarm.h>
72
71
#include <libdrizzleclient/errmsg.h>
73
72
#include <locale.h>
74
73
 
504
503
    struct timespec abstime;
505
504
    int error;
506
505
 
507
 
#ifndef DONT_USE_THR_ALARM
508
 
    if (pthread_kill(select_thread, thr_client_alarm))
509
 
      break;                                    // allready dead
510
 
#endif
511
506
    set_timespec(abstime, 2);
512
507
    for (uint32_t tmp=0 ; tmp < 10 && select_thread_in_use; tmp++)
513
508
    {
540
535
    }
541
536
  }
542
537
 
543
 
  end_thr_alarm(0);                      // Abort old alarms.
544
 
 
545
538
  /*
546
539
    First signal all threads that it's time to die
547
540
    This will give the threads some time to gracefully abort their
779
772
  delete_elements(&key_caches, (void (*)(const char*, unsigned char*)) free_key_cache);
780
773
  multi_keycache_free();
781
774
  free_status_vars();
782
 
  end_thr_alarm(1);                     /* Free allocated memory */
783
775
  my_free_open_file_info();
784
776
  free((char*) global_system_variables.date_format);
785
777
  free((char*) global_system_variables.time_format);
1363
1355
  sigset_t set;
1364
1356
  struct sigaction sa;
1365
1357
 
1366
 
  my_sigset(THR_SERVER_ALARM,print_signal_warning); // Should never be called!
1367
 
 
1368
1358
  if (!(test_flags & TEST_NO_STACKTRACE) || (test_flags & TEST_CORE_ON_SIGNAL))
1369
1359
  {
1370
1360
    sa.sa_flags = SA_RESETHAND | SA_NODEFER;
1414
1404
#ifdef SIGTSTP
1415
1405
  sigaddset(&set,SIGTSTP);
1416
1406
#endif
1417
 
  if (thd_lib_detected != THD_LIB_LT)
1418
 
    sigaddset(&set,THR_SERVER_ALARM);
1419
1407
  if (test_flags & TEST_SIGINT)
1420
1408
  {
1421
1409
    my_sigset(thr_kill_signal, end_thread_signal);
1478
1466
  my_thread_init();                             // Init new thread
1479
1467
  signal_thread_in_use= 1;
1480
1468
 
1481
 
  /*
1482
 
    Setup alarm handler
1483
 
    This should actually be '+ max_number_of_slaves' instead of +10,
1484
 
    but the +10 should be quite safe.
1485
 
  */
1486
 
  init_thr_alarm(thread_scheduler.max_threads + 10);
1487
1469
  if (thd_lib_detected != THD_LIB_LT && (test_flags & TEST_SIGINT))
1488
1470
  {
1489
1471
    (void) sigemptyset(&set);                   // Setup up SIGINT for debug