Merge branch 'kernel' of 106.109.8.71:/srv/git/dbi into kernel
[kernel/swap-modules.git] / kprobe / dbi_insn_slots.h
index 302f65a..39e63a3 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _SRC_INSNS_SLOTS_H
-#define _SRC_INSNS_SLOTS_H
+#ifndef _DBI_INSNS_SLOTS_H
+#define _DBI_INSNS_SLOTS_H
 
 /*
  *  Kernel Probes (KProbes)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- * Copyright (C) Samsung Electronics, 2006-2013
+ * Copyright (C) Samsung Electronics, 2006-2010
  *
- * 2008-2009    Alexey Gerenkov <a.gerenkov@samsung.com> 
- *              User-Space Probes initial implementation;
- *              Support x86/ARM/MIPS for both user and kernel spaces.
- * 2010         Ekaterina Gorelkina <e.gorelkina@samsung.com>: redesign module
- *              for separating core and arch parts
- * 2010-2012    Dmitry Kovalenko <d.kovalenko@samsung.com>,
- *              Nikita Kalyazin <n.kalyazin@samsung.com>
- *              improvement and bugs fixing
- * 2010-2011    Alexander Shirshikov
- *              improvement and bugs fixing
- * 2011-2012    Stanislav Andreev <s.andreev@samsung.com>
- *              improvement and bugs fixing
- * 2012         Vitaliy Cherepanov <v.chereapanov@samsung.com>
- *              improvement and bugs fixing
- * 2012-2013    Vasiliy Ulyanov <v.ulyanov@samsung.com>,
- *              Vyacheslav Cherkashin <v.cherkashin@samsung.com>
- *              improvement and bugs fixing
+ * 2008-2009    Alexey Gerenkov <a.gerenkov@samsung.com> User-Space
+ *              Probes initial implementation; Support x86/ARM/MIPS for both user and kernel spaces.
+ * 2010         Ekaterina Gorelkina <e.gorelkina@samsung.com>: redesign module for separating core and arch parts
+ * 2012-2013    Vyacheslav Cherkashin <v.cherkashin@samsung.com> new memory allocator for slots
  */
 
-#include "dbi_kprobes.h"
+#include <linux/types.h>
 
+struct slot_manager {
+       unsigned long slot_size;
+       void *(*alloc)(struct slot_manager *sm);
+       void (*free)(struct slot_manager *sm, void *ptr);
+       struct hlist_head page_list;
+       void *data;
+};
 
-kprobe_opcode_t *get_insn_slot(struct task_struct *task, int atomic);
-void free_insn_slot(struct hlist_head *page_list, struct task_struct *task, kprobe_opcode_t *slot);
+void *alloc_insn_slot(struct slot_manager *sm);
+void free_insn_slot(struct slot_manager *sm, void *slot);
 
-extern struct hlist_head kprobe_insn_pages;
-extern struct hlist_head uprobe_insn_pages;
-
-#endif /*  _SRC_INSNS_SLOTS_H */
+#endif /* _DBI_INSNS_SLOTS_H */