~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pool_of_threads/pool_of_threads.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <fcntl.h>
23
23
#include <plugin/pool_of_threads/pool_of_threads.h>
24
24
#include "drizzled/pthread_globals.h"
 
25
#include "drizzled/internal/my_pthread.h"
25
26
 
26
27
using namespace std;
27
28
using namespace drizzled;
28
29
 
29
 
 
30
30
/* Global's (TBR) */
31
31
static PoolOfThreadsScheduler *scheduler= NULL;
32
32
 
51
51
void libevent_session_add(Session* session);
52
52
bool libevent_should_close_connection(Session* session);
53
53
extern "C" {
54
 
  pthread_handler_t libevent_thread_proc(void *arg);
 
54
  void *libevent_thread_proc(void *arg);
55
55
  void libevent_io_callback(int Fd, short Operation, void *ctx);
56
56
  void libevent_add_session_callback(int Fd, short Operation, void *ctx);
57
57
  void libevent_kill_session_callback(int Fd, short Operation, void *ctx);
301
301
 *  These procs only return/terminate on shutdown (kill_pool_threads ==
302
302
 *  true).
303
303
 */
304
 
pthread_handler_t libevent_thread_proc(void *ctx)
 
304
void *libevent_thread_proc(void *ctx)
305
305
{
306
306
  if (my_thread_init())
307
307
  {
315
315
  return pot_scheduler->mainLoop();
316
316
}
317
317
 
318
 
pthread_handler_t PoolOfThreadsScheduler::mainLoop()
 
318
void *PoolOfThreadsScheduler::mainLoop()
319
319
{
320
320
  /*
321
321
   Signal libevent_init() when all threads has been created and are ready