--- /dev/null
+/*
+ * SWAP device driver
+ * modules/driver/app_manage.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * 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, 2014
+ *
+ * 2014 Alexander Aksenov <a.aksenov@samsung.com>: Driver user<-> kernel
+ * connect implement
+ *
+ */
+
+#ifndef __APP_MANAGE_H__
+#define __APP_MANAGE_H__
+
+#include "us_interaction.h"
+#include "us_interaction_msg.h"
+
+static inline int app_manage_pause_apps(void)
+{
+ enum us_interaction_k2u_msg_t us_int_msg = US_INT_PAUSE_APPS;
+
+ return us_interaction_send_msg(&us_int_msg, sizeof(us_int_msg));
+}
+
+static inline int app_manage_cont_apps(void)
+{
+ enum us_interaction_k2u_msg_t us_int_msg = US_INT_CONT_APPS;
+
+ return us_interaction_send_msg(&us_int_msg, sizeof(us_int_msg));
+}
+
+#endif /* __APP_MANAGE_H__ */
#include "driver_defs.h"
#include "swap_driver_errors.h"
#include "device_driver_to_driver_to_buffer.h"
+#include "app_manage.h"
/* Current busy buffer */
static struct swap_subbuffer *busy_buffer = NULL;
.nr_subbuffers = count,
.subbuffer_full_cb = driver_to_buffer_callback,
.lower_threshold = 20,
- .low_mem_cb = NULL,
+ .low_mem_cb = app_manage_pause_apps,
.top_threshold = 80,
- .enough_mem_cb = NULL,
+ .enough_mem_cb = app_manage_cont_apps,
};
if (size == 0 && count == 0) {