diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 19:44:44 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-12-16 19:13:56 +0100 |
commit | 0cb257586abb35cd69be794e7b56244d8704ff57 (patch) | |
tree | 76d567adfe2a4987d2ee76658d82c37ef5ba0982 | |
parent | 1193c6e3498bb91127f16d237c61eeb2b84937c0 (diff) |
Move macro definitions close to usage
-rw-r--r-- | Process.h | 4 | ||||
-rw-r--r-- | linux/LinuxProcess.c | 5 |
2 files changed, 5 insertions, 4 deletions
@@ -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 |