02d3c405059d97d2bf50da82c8e78d11388f8118
[kernel/swap-modules.git] / driver / handlers_core.h
1 ////////////////////////////////////////////////////////////////////////////////////
2 //
3 //      FILE:           handlers_core.h
4 //
5 //      DESCRIPTION:
6 //      This file is C source for SWAP.
7 //
8 //      SEE ALSO:       storage.c
9 //      AUTHOR:         S. Andreev
10 //      COMPANY NAME:   Samsung Research Center in Moscow
11 //      DEPT NAME:      Advanced Software Group
12 //      CREATED:        2012.07.25
13 //      VERSION:        1.0
14 //      REVISION DATE:  2012.07.25
15 //
16 ////////////////////////////////////////////////////////////////////////////////////
17
18 #if !defined(__HANDLERS_CORE_H__)
19 #define __HANDLERS_CORE_H__
20
21 #include <linux/module.h>
22 #include <linux/list.h>
23 #include <linux/spinlock.h>
24
25 // multiple handlers stuff
26 struct dbi_modules_handlers {
27         struct list_head        modules_handlers;
28         spinlock_t              lock;
29 };
30
31 struct dbi_modules_handlers_info {
32         struct module           *dbi_module;
33         struct handler_map      *dbi_handlers;
34         int                     dbi_nr_handlers;
35         struct list_head        dbi_list_head;
36         void *                  dbi_module_callback_start;
37         void *                  dbi_module_callback_stop;
38         int                     dbi_module_priority_start;
39         int                     dbi_module_priority_stop;
40 };
41
42 extern int dbi_register_handlers_module(struct dbi_modules_handlers_info *dbi_mhi);
43 extern int dbi_unregister_handlers_module(struct dbi_modules_handlers_info *dbi_mhi);
44 //unsigned long get_dbi_modules_handlers(void);
45
46 #endif /* !defined(__HANDLERS_CORE_H__) */