806
by Brian Aker
Adding in an example singe thread scheduler |
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 |
||
1241.9.36
by Monty Taylor
ZOMG. I deleted drizzled/server_includes.h. |
16 |
#include "config.h" |
1152.1.5
by Brian Aker
Remove Factory/make scheduler work like everything else. |
17 |
#include <plugin/single_thread/single_thread.h> |
971.3.64
by Eric Day
Cleaned up Scheduler plugin, moved more code to the schedular plugins, reworked some functions to be methods in Session, removed some dead code. |
18 |
|
806
by Brian Aker
Adding in an example singe thread scheduler |
19 |
using namespace std; |
971.3.64
by Eric Day
Cleaned up Scheduler plugin, moved more code to the schedular plugins, reworked some functions to be methods in Session, removed some dead code. |
20 |
using namespace drizzled; |
806
by Brian Aker
Adding in an example singe thread scheduler |
21 |
|
1152.1.5
by Brian Aker
Remove Factory/make scheduler work like everything else. |
22 |
|
23 |
/* Global's (TBR) */
|
|
24 |
static SingleThreadScheduler *scheduler= NULL; |
|
25 |
||
971.1.51
by Monty Taylor
New-style plugin registration now works. |
26 |
|
1530.2.6
by Monty Taylor
Moved plugin::Context to module::Context. |
27 |
static int init(module::Context &context) |
806
by Brian Aker
Adding in an example singe thread scheduler |
28 |
{
|
1152.1.5
by Brian Aker
Remove Factory/make scheduler work like everything else. |
29 |
scheduler= new SingleThreadScheduler("single_thread"); |
1324.2.2
by Monty Taylor
Use the plugin::Context everywhere. |
30 |
context.add(scheduler); |
806
by Brian Aker
Adding in an example singe thread scheduler |
31 |
return 0; |
32 |
}
|
|
33 |
||
1228.1.5
by Monty Taylor
Merged in some naming things. |
34 |
DRIZZLE_DECLARE_PLUGIN
|
806
by Brian Aker
Adding in an example singe thread scheduler |
35 |
{
|
1241.10.2
by Monty Taylor
Added support for embedding the drizzle version number in the plugin file. |
36 |
DRIZZLE_VERSION_ID, |
806
by Brian Aker
Adding in an example singe thread scheduler |
37 |
"single_thread", |
38 |
"0.1", |
|
39 |
"Brian Aker", |
|
40 |
"Single Thread Scheduler", |
|
41 |
PLUGIN_LICENSE_GPL, |
|
42 |
init, /* Plugin Init */ |
|
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
43 |
NULL, /* system variables */ |
806
by Brian Aker
Adding in an example singe thread scheduler |
44 |
NULL /* config options */ |
45 |
}
|
|
1228.1.5
by Monty Taylor
Merged in some naming things. |
46 |
DRIZZLE_DECLARE_PLUGIN_END; |