Change-Id: I34901326eb65f51f57786bb743b71a9bff861217
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
--- /dev/null
+#ifndef __CALLBACKS_H__
+#define __CALLBACKS_H__
+
+void register_pf_cb(int (*cb)(void));
+
+#endif /* __CALLBACKS_H__ */
#include "us_slot_manager.h"
#include "sspt/sspt.h"
#include "helper.h"
+#include "callbacks.h"
struct task_struct;
struct task_struct *check_task(struct task_struct *task);
+/* Callback for ret_handler_mf */
+static int (*pf_cb)(void) = NULL;
+
/*
******************************************************************************
* do_page_fault() *
/* TODO: check return value */
page_addr = ((struct pf_data *)ri->data)->addr & PAGE_MASK;
+
+ if (pf_cb)
+ pf_cb();
+
call_page_fault(task, page_addr);
return 0;
void uninit_helper(void)
{
}
+
+void register_pf_cb(int (*cb)(void))
+{
+ pf_cb = cb;
+}