[tracker-miners/tracker-miners-2.3: 4/4] libtracker-miners-common: Add comment to sched-idle fallback path



commit c5fc7422eb5940299bb65f6ab61bd7c0eed74839
Author: Sam Thursfield <sam afuera me uk>
Date:   Sun Feb 2 20:58:57 2020 +0100

    libtracker-miners-common: Add comment to sched-idle fallback path

 src/libtracker-miners-common/tracker-sched.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/libtracker-miners-common/tracker-sched.c b/src/libtracker-miners-common/tracker-sched.c
index 4a87f7a02..f4cd65f5b 100644
--- a/src/libtracker-miners-common/tracker-sched.c
+++ b/src/libtracker-miners-common/tracker-sched.c
@@ -59,6 +59,15 @@ tracker_sched_idle (void)
 
 #else /* __linux__ */
 
+/* Although pthread_setschedparam() should exist on any POSIX compliant OS,
+ * the SCHED_IDLE policy is Linux-specific. The POSIX standard only requires
+ * the existence of realtime and 'other' policies.
+ *
+ * We could set the priority to 0. On FreeBSD the default priority is already
+ * 0, and this may be true on other platforms, so we currently don't bother.
+ * See https://gitlab.gnome.org/GNOME/tracker-miners/merge_requests/140 for
+ * more discussion.
+ */
 #include <glib.h>
 
 #include "tracker-sched.h"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]