summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-15 19:44:44 +0100
committerChristian Göttsche <cgzones@googlemail.com>2020-12-16 19:13:56 +0100
commit0cb257586abb35cd69be794e7b56244d8704ff57 (patch)
tree76d567adfe2a4987d2ee76658d82c37ef5ba0982
parent1193c6e3498bb91127f16d237c61eeb2b84937c0 (diff)
Move macro definitions close to usage
-rw-r--r--Process.h4
-rw-r--r--linux/LinuxProcess.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/Process.h b/Process.h
index d50865fb..1f118e70 100644
--- a/Process.h
+++ b/Process.h
@@ -15,10 +15,6 @@ in the source distribution for its full text.
#include "Object.h"
#include "RichString.h"
-#ifdef __ANDROID__
-#define SYS_ioprio_get __NR_ioprio_get
-#define SYS_ioprio_set __NR_ioprio_set
-#endif
#define PROCESS_FLAG_IO 0x0001
#define DEFAULT_HIGHLIGHT_SECS 5
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index d1cad976..8cd9f492 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -184,6 +184,11 @@ static int LinuxProcess_effectiveIOPriority(const LinuxProcess* this) {
return this->ioPriority;
}
+#ifdef __ANDROID__
+#define SYS_ioprio_get __NR_ioprio_get
+#define SYS_ioprio_set __NR_ioprio_set
+#endif
+
IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this) {
IOPriority ioprio = 0;
// Other OSes masquerading as Linux (NetBSD?) don't have this syscall

© 2014-2024 Faster IT GmbH | imprint | privacy policy