aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-06-20 13:53:54 +0200
committerSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-06-20 13:53:54 +0200
commit58fc3a8f32d6fe71910ee0479afc3c8478c12540 (patch)
tree4b3c1578d871f0ce4bfcfe08d0c254c5b8f05af5 /src/bin/efreet
parentefl: formatting (diff)
downloadefl-58fc3a8f32d6fe71910ee0479afc3c8478c12540.tar.gz
efreet: Low priority for cache rebuild
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreet_desktop_cache_create.c3
-rw-r--r--src/bin/efreet/efreet_icon_cache_create.c3
-rw-r--r--src/bin/efreet/efreetd.c4
-rw-r--r--src/bin/efreet/efreetd_cache.c9
4 files changed, 10 insertions, 9 deletions
diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c
index db3118ca1d..17f41e342a 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -5,6 +5,8 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#include <sys/time.h>
+#include <sys/resource.h>
#include <Eina.h>
#include <Eet.h>
@@ -250,6 +252,7 @@ main(int argc, char **argv)
}
extra_dirs = eina_list_sort(extra_dirs, -1, EINA_COMPARE_CB(strcmp));
+ setpriority(PRIO_PROCESS, 0, 19);
/* init external subsystems */
if (!eet_init()) goto eet_error;
if (!ecore_init()) goto ecore_error;
diff --git a/src/bin/efreet/efreet_icon_cache_create.c b/src/bin/efreet/efreet_icon_cache_create.c
index a4f774ca8f..74732807b0 100644
--- a/src/bin/efreet/efreet_icon_cache_create.c
+++ b/src/bin/efreet/efreet_icon_cache_create.c
@@ -6,6 +6,8 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#include <sys/time.h>
+#include <sys/resource.h>
#include <Eina.h>
#include <Eet.h>
@@ -768,6 +770,7 @@ main(int argc, char **argv)
flush = EINA_TRUE;
}
+ setpriority(PRIO_PROCESS, 0, 19);
if (!eet_init()) return -1;
if (!ecore_init()) return -1;
diff --git a/src/bin/efreet/efreetd.c b/src/bin/efreet/efreetd.c
index 97b516299c..d3f6d8cfac 100644
--- a/src/bin/efreet/efreetd.c
+++ b/src/bin/efreet/efreetd.c
@@ -2,6 +2,9 @@
# include <config.h>
#endif
+#include <sys/time.h>
+#include <sys/resource.h>
+
#include <Ecore.h>
#include <Ecore_File.h>
@@ -34,6 +37,7 @@ main(int argc, char *argv[])
if (!dbus_init()) goto dbus_error;
if (!cache_init()) goto cache_error;
+ setpriority(PRIO_PROCESS, 0, 19);
ecore_main_loop_begin();
cache_shutdown();
diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 4d7fd9d2d6..c286b13db0 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -42,7 +42,6 @@ static Eina_Bool
icon_cache_update_cache_cb(void *data EINA_UNUSED)
{
char file[PATH_MAX];
- int prio;
icon_cache_timer = NULL;
@@ -55,9 +54,6 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
if ((!icon_flush) && (!icon_exts)) return ECORE_CALLBACK_CANCEL;
/* TODO: Queue if already running */
- prio = ecore_exe_run_priority_get();
- ecore_exe_run_priority_set(19);
-
snprintf(file, sizeof(file),
"%s/efreet/" MODULE_ARCH "/efreet_icon_cache_create",
eina_prefix_lib_get(pfx));
@@ -90,7 +86,6 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
icon_flush = EINA_FALSE;
icon_cache_exe =
ecore_exe_pipe_run(file, ECORE_EXE_PIPE_READ|ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
- ecore_exe_run_priority_set(prio);
return ECORE_CALLBACK_CANCEL;
}
@@ -109,7 +104,6 @@ static Eina_Bool
desktop_cache_update_cache_cb(void *data EINA_UNUSED)
{
char file[PATH_MAX];
- int prio;
desktop_cache_timer = NULL;
@@ -119,8 +113,6 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
return ECORE_CALLBACK_CANCEL;
}
desktop_queue = EINA_FALSE;
- prio = ecore_exe_run_priority_get();
- ecore_exe_run_priority_set(19);
snprintf(file, sizeof(file),
"%s/efreet/" MODULE_ARCH "/efreet_desktop_cache_create",
@@ -140,7 +132,6 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
INF("Run desktop cache creation: %s", file);
desktop_cache_exe =
ecore_exe_pipe_run(file, ECORE_EXE_PIPE_READ|ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
- ecore_exe_run_priority_set(prio);
return ECORE_CALLBACK_CANCEL;
}