Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37740730
en ru br
Репозитории ALT
S:1.0-alt2
5.1: 0.02-alt1
www.altlinux.org/Changes

Группа :: Система/Настройка/Загрузка и инициализация
Пакет: sreadahead

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: sreadahead-1.0-alt-ioprio-arches.patch
Скачать


Based on ionice's configure bits as of util-linux 2.33.2;
arm/aarch64, hppa, mips, sparch64 borrowed from fio 3.13;
e2k added based on corresponding kernel headers.
Michael Shigorin <mike@altlinux.org>
2019-06-20
diff -Naur sreadahead-1.0-orig/sreadahead.c sreadahead-1.0/sreadahead.c
--- sreadahead-1.0-orig/sreadahead.c	2009-01-27 22:51:46.000000000 +0300
+++ sreadahead-1.0/sreadahead.c	2019-06-20 11:10:56.807523695 +0300
@@ -35,12 +35,39 @@
 #define VERSION "1.0"
 
 #undef HAVE_IO_PRIO
-#if defined(__i386__)
+#if defined(__i386__) || defined(__e2k__)
 #  define HAVE_IO_PRIO
 #  define __NR_ioprio_set 289
 #elif defined(__x86_64__)
 #  define HAVE_IO_PRIO
 #  define __NR_ioprio_set 251
+#elif defined(__ia64__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 1274
+#elif defined(__alpha__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 442
+#elif defined(__powerpc__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 273
+#elif defined(__s390x__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 282
+#elif defined(__sparc__) || defined(__sparc64__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 196
+#elif defined(__hppa__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 267
+#elif defined(__sh__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 288
+#elif defined(__arm__) || defined(__mips__) || defined(__mips64__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 314
+#elif defined(__aarch64__)
+#  define HAVE_IO_PRIO
+#  define __NR_ioprio_set 30
 #else /* not fatal */
 #  warn "Architecture does not support ioprio modification"
 #endif
@@ -608,7 +635,9 @@
 int main(int argc, char **argv)
 {
 	FILE *file;
+#ifdef HAVE_IO_PRIO
 	int pid = 0;
+#endif
 	pthread_t one, two, three, four;
 
 	while (1) {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin