#ifndef __REGS_H__
#define __REGS_H__
-#include <uapi/asm/ptrace.h>
+#include <linux/ptrace.h>
#include "fbi_probe_module.h"
/* This function is used to compare register number and its name on x86 arch.
hlist_for_each_entry_safe(tpos, pos, n, head, member)
#define swap_hlist_for_each_entry(tpos, pos, head, member) \
hlist_for_each_entry(tpos, pos, head, member)
+
+#define list_first_entry_or_null(ptr, type, member) \
+ (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL)
+
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12))
#include <linux/sched.h>
+#include <linux/module.h>
#include <writer/swap_msg.h>
#include <writer/kernel_operations.h>
#include "rp_msg.h"
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/atomic.h>
+#include <linux/module.h>
+#include <kprobe/swap_kprobes.h>
#include <buffer/swap_buffer_module.h>
#include <swap-asm/swap_kprobes.h>
#include <swap-asm/swap_uprobes.h>
#include <linux/slab.h>
#include <linux/atomic.h>
+#include <kprobe/swap_kprobes_deps.h>
#include "wsp_res.h"
static atomic_t wsp_res_count;