diff options
author | Benny Baumann <BenBE@geshi.org> | 2021-04-10 13:56:03 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-05-23 09:22:21 +0200 |
commit | 1a1fddae851b344b0a89a8f2753e2d2487f34064 (patch) | |
tree | 540cc6cc1a03db0cbf602d89e1e11f763f63c5e7 /linux/LinuxProcess.h | |
parent | cdb660adabada0c293ed86ebf5638d435950a03f (diff) |
Pre-calculate isUserlandThread flag
Diffstat (limited to 'linux/LinuxProcess.h')
-rw-r--r-- | linux/LinuxProcess.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index 4a52807e..20963bcb 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -33,6 +33,7 @@ in the source distribution for its full text. typedef struct LinuxProcess_ { Process super; bool isKernelThread; + bool isUserlandThread; IOPriority ioPriority; unsigned long int cminflt; unsigned long int cmajflt; @@ -106,9 +107,7 @@ typedef struct LinuxProcess_ { #define Process_isKernelThread(_process) (((const LinuxProcess*)(_process))->isKernelThread) -static inline bool Process_isUserlandThread(const Process* this) { - return this->pid != this->tgid; -} +#define Process_isUserlandThread(_process) (((const LinuxProcess *)(_process))->isUserlandThread) extern int pageSize; |