summaryrefslogtreecommitdiff
path: root/src/libtracker-common
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2020-01-09 11:35:19 +0100
committerSam Thursfield <sam@afuera.me.uk>2020-01-09 11:43:48 +0100
commit209c780b4ac0433368a9a1dd1095d3487b0e86e2 (patch)
tree1b797313732fe207c5666ad098d9beb736133a2b /src/libtracker-common
parent51535325b1a323111919aab9a7b65ec159419a66 (diff)
downloadtracker-209c780b4ac0433368a9a1dd1095d3487b0e86e2.tar.gz
libtracker-common: Remove tracker_sched_idle() code
This is still used in tracker-miners.git, but it's no longer used in tracker.git. See: https://gitlab.gnome.org/GNOME/tracker/issues/170
Diffstat (limited to 'src/libtracker-common')
-rw-r--r--src/libtracker-common/meson.build1
-rw-r--r--src/libtracker-common/tracker-common.h1
-rw-r--r--src/libtracker-common/tracker-sched.c77
-rw-r--r--src/libtracker-common/tracker-sched.h35
4 files changed, 0 insertions, 114 deletions
diff --git a/src/libtracker-common/meson.build b/src/libtracker-common/meson.build
index 041b7f0b2..60941a078 100644
--- a/src/libtracker-common/meson.build
+++ b/src/libtracker-common/meson.build
@@ -17,7 +17,6 @@ tracker_common_sources = [
'tracker-file-utils.c',
'tracker-ioprio.c',
'tracker-log.c',
- 'tracker-sched.c',
'tracker-type-utils.c',
'tracker-utils.c',
'tracker-locale.c',
diff --git a/src/libtracker-common/tracker-common.h b/src/libtracker-common/tracker-common.h
index 5a97e9894..65a20c2bc 100644
--- a/src/libtracker-common/tracker-common.h
+++ b/src/libtracker-common/tracker-common.h
@@ -36,7 +36,6 @@
#include "tracker-language.h"
#include "tracker-log.h"
#include "tracker-parser.h"
-#include "tracker-sched.h"
#include "tracker-type-utils.h"
#include "tracker-utils.h"
#include "tracker-locale.h"
diff --git a/src/libtracker-common/tracker-sched.c b/src/libtracker-common/tracker-sched.c
deleted file mode 100644
index 15dbbed67..000000000
--- a/src/libtracker-common/tracker-sched.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2011, Nokia <ivan.frade@nokia.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#ifdef __linux__
-
-#include <errno.h>
-#include <sched.h>
-
-#include "tracker-sched.h"
-
-gboolean
-tracker_sched_idle (void)
-{
- struct sched_param sp;
-
- /* Set process scheduling parameters:
- * This is used so we don't steal scheduling priority from
- * the most important applications - like the phone
- * application which has a real time requirement here. This
- * is detailed in Nokia bug #95573
- */
- g_message ("Setting scheduler policy to SCHED_IDLE");
-
- if (sched_getparam (0, &sp) == 0) {
- if (sched_setscheduler (0, SCHED_IDLE, &sp) != 0) {
-//LCOV_EXCL_START
- const gchar *str = g_strerror (errno);
-
- g_warning ("Could not set scheduler policy, %s",
- str ? str : "no error given");
-
- return FALSE;
- }
- } else {
- const gchar *str = g_strerror (errno);
-
- g_warning ("Could not get scheduler policy, %s",
- str ? str : "no error given");
-
- return FALSE;
- }
-//LCOV_EXCL_END
-
- return TRUE;
-}
-
-#else /* __linux__ */
-
-#include <glib.h>
-
-#include "tracker-sched.h"
-
-gboolean
-tracker_sched_idle (void)
-{
- return TRUE;
-}
-
-#endif /* __linux__ */
diff --git a/src/libtracker-common/tracker-sched.h b/src/libtracker-common/tracker-sched.h
deleted file mode 100644
index 7f9590e3f..000000000
--- a/src/libtracker-common/tracker-sched.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2011, Nokia <ivan.frade@nokia.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef __LIBTRACKER_COMMON_SCHED_H__
-#define __LIBTRACKER_COMMON_SCHED_H__
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-#if !defined (__LIBTRACKER_COMMON_INSIDE__) && !defined (TRACKER_COMPILATION)
-#error "only <libtracker-common/tracker-common.h> must be included directly."
-#endif
-
-gboolean tracker_sched_idle (void);
-
-G_END_DECLS
-
-#endif /* __LIBTRACKER_COMMON_SCHED_H__ */