~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/single_thread/single_thread.cc

  • Committer: Patrick Galbraith
  • Date: 2009-10-08 22:42:05 UTC
  • mto: (1166.5.3 memcached_functions)
  • mto: This revision was merged to the branch mainline in revision 1189.
  • Revision ID: patg@patrick-galbraiths-macbook-pro.local-20091008224205-gq1pehjsivvx0qo9
Starting over with a fresh tree, moved in memcached functions.

Memcached Functions for Drizzle. 

All tests pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2006 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
15
 
 
16
#include <plugin/single_thread/single_thread.h>
 
17
 
 
18
using namespace std;
 
19
using namespace drizzled;
 
20
 
 
21
 
 
22
/* Global's (TBR) */
 
23
static SingleThreadScheduler *scheduler= NULL;
 
24
 
 
25
 
 
26
static int init(drizzled::plugin::Registry &registry)
 
27
{
 
28
  scheduler= new SingleThreadScheduler("single_thread");
 
29
  registry.add(scheduler);
 
30
  return 0;
 
31
}
 
32
 
 
33
static int deinit(drizzled::plugin::Registry &registry)
 
34
{
 
35
  registry.remove(scheduler);
 
36
  delete scheduler;
 
37
 
 
38
  return 0;
 
39
}
 
40
 
 
41
static struct st_mysql_sys_var* system_variables[]= {
 
42
  NULL
 
43
};
 
44
 
 
45
drizzle_declare_plugin(single_thread)
 
46
{
 
47
  "single_thread",
 
48
  "0.1",
 
49
  "Brian Aker",
 
50
  "Single Thread Scheduler",
 
51
  PLUGIN_LICENSE_GPL,
 
52
  init, /* Plugin Init */
 
53
  deinit, /* Plugin Deinit */
 
54
  NULL,   /* status variables */
 
55
  system_variables,   /* system variables */
 
56
  NULL    /* config options */
 
57
}
 
58
drizzle_declare_plugin_end;