~maria-developers/maria/wlad-5.5-threadpool

« back to all changes in this revision

Viewing changes to sql/threadpool_win.cc

  • Committer: Vladislav Vaintroub
  • Date: 2011-12-05 00:44:37 UTC
  • Revision ID: wlad@montyprogram.com-20111205004437-rd5lqj1xue714j8q
fix compilation on Windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <windows.h>
18
18
 
19
19
 
20
 
TP_PARAMETERS tp_params;
 
20
 
21
21
TP_STATISTICS tp_stats;
22
22
 
23
23
#define WEAK_SYMBOL(return_type, function, ...) \
468
468
        if not all threads have shut down yet to the point they would ran Fls
469
469
        destructors, even after CloseThreadpool(). See also comment in tp_end().
470
470
      */
 
471
      mysql_mutex_lock(&LOCK_thread_count); 
471
472
      my_thread_end();
 
473
      mysql_mutex_unlock(&LOCK_thread_count); 
472
474
    }
473
475
  }
474
476
}
487
489
    exit(1);
488
490
  }
489
491
 
490
 
  if (tp_params.max_threads)
 
492
  if (threadpool_max_threads)
491
493
  {
492
 
    SetThreadpoolThreadMaximum(pool, tp_params.max_threads);
 
494
    SetThreadpoolThreadMaximum(pool,threadpool_max_threads);
493
495
  }
494
496
 
495
 
  if (tp_params.min_threads)
 
497
  if (threadpool_min_threads)
496
498
  {
497
 
    if (!SetThreadpoolThreadMinimum(pool, tp_params.min_threads))
 
499
    if (!SetThreadpoolThreadMinimum(pool, threadpool_min_threads))
498
500
    {
499
501
      tp_log_warning( "Can't set threadpool minimum threads", 
500
502
        "SetThreadpoolThreadMinimum");