~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/scheduler.h

update to latest from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
*/
26
26
 
27
27
/* Forward declarations */
28
 
class THD;
 
28
class Session;
29
29
struct event;
30
30
 
31
31
/* Functions used when manipulating threads */
36
36
  uint32_t max_threads;
37
37
  bool (*init)(void);
38
38
  bool (*init_new_connection_thread)(void);
39
 
  void (*add_connection)(THD *thd);
40
 
  void (*post_kill_notification)(THD *thd);
41
 
  bool (*end_thread)(THD *thd, bool cache_thread);
 
39
  void (*add_connection)(Session *session);
 
40
  void (*post_kill_notification)(Session *session);
 
41
  bool (*end_thread)(Session *session, bool cache_thread);
42
42
  void (*end)(void);
43
43
  scheduler_functions();
44
44
};
53
53
 
54
54
#define HAVE_POOL_OF_THREADS 1
55
55
 
56
 
class thd_scheduler
 
56
class session_scheduler
57
57
{
58
58
public:
59
59
  bool logged_in;
60
60
  struct event* io_event;
61
61
  LIST list;
62
 
  bool thread_attached;  /* Indicates if THD is attached to the OS thread */
 
62
  bool thread_attached;  /* Indicates if Session is attached to the OS thread */
63
63
 
64
 
  thd_scheduler();
65
 
  ~thd_scheduler();
66
 
  thd_scheduler(const thd_scheduler&);
67
 
  void operator=(const thd_scheduler&);
68
 
  bool init(THD* parent_thd);
 
64
  session_scheduler();
 
65
  ~session_scheduler();
 
66
  session_scheduler(const session_scheduler&);
 
67
  void operator=(const session_scheduler&);
 
68
  bool init(Session* parent_session);
69
69
  bool thread_attach();
70
70
  void thread_detach();
71
71
};