drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
plugin/user_locks/module.cc
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
*
4
* Copyright (C) 2010 Brian Aker
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#include <config.h>
22
#include <plugin/user_locks/module.h>
23
24
using namespace
drizzled
;
25
26
static
int
init(
drizzled::module::Context
&context)
27
{
28
// We are single threaded at this point, so we can use this to initialize.
29
user_locks::Locks::getInstance();
30
user_locks::barriers::Barriers::getInstance();
31
32
context.add(
new
plugin::Create_function<user_locks::barriers::CreateBarrier>
(
"create_barrier"
));
33
context.add(
new
plugin::Create_function<user_locks::barriers::Release>
(
"release_barrier"
));
34
context.add(
new
plugin::Create_function<user_locks::barriers::Wait>
(
"wait"
));
35
context.add(
new
plugin::Create_function<user_locks::barriers::WaitUntil>
(
"wait_until"
));
36
context.add(
new
plugin::Create_function<user_locks::barriers::Signal>
(
"signal"
));
37
38
context.add(
new
plugin::Create_function<user_locks::GetLock>
(
"get_lock"
));
39
context.add(
new
plugin::Create_function<user_locks::GetLocks>
(
"get_locks"
));
40
context.add(
new
plugin::Create_function<user_locks::ReleaseLock>
(
"release_lock"
));
41
context.add(
new
plugin::Create_function<user_locks::ReleaseLocks>
(
"release_locks"
));
42
context.add(
new
plugin::Create_function<user_locks::IsFreeLock>
(
"is_free_lock"
));
43
context.add(
new
plugin::Create_function<user_locks::IsUsedLock>
(
"is_used_lock"
));
44
context.add(
new
plugin::Create_function<user_locks::locks::WaitFor>
(
"wait_for_lock"
));
45
context.add(
new
plugin::Create_function<user_locks::locks::ReleaseAndWait>
(
"release_lock_and_wait"
));
46
context.add(
new
user_locks::UserLocks
);
47
context.add(
new
user_locks::barriers::UserBarriers
);
48
49
return
0;
50
}
51
52
DRIZZLE_DECLARE_PLUGIN
53
{
54
DRIZZLE_VERSION_ID,
55
"user_locks"
,
56
"1.1"
,
57
"Brian Aker"
,
58
N_(
"User-level locking and barrier functions"
),
59
PLUGIN_LICENSE_GPL,
60
init,
61
NULL,
62
NULL
63
}
64
DRIZZLE_DECLARE_PLUGIN_END;
drizzled::module::Context
Definition
module/context.h:45
drizzled::plugin::Create_function
Definition
drizzled/plugin/function.h:68
user_locks::UserLocks
Definition
user_locks_dictionary.h:26
user_locks::barriers::UserBarriers
Definition
barrier_dictionary.h:27
drizzled
TODO: Rename this file - func.h is stupid.
Definition
abort_exception.h:27
← Back to Drizzle docs
plugin
user_locks
module.cc
Generated by
1.15.0