From 76797f8d928a9278f7356e270ef07cea1db5510a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 27 Oct 2020 21:26:41 +0100 Subject: [PATCH] Implement Process_isUserlandThread as function Make it more readable and fix unenclosed macro arguments --- linux/LinuxProcess.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index 02e4af7e..3f978346 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -157,7 +157,9 @@ typedef struct LinuxProcess_ { #define Process_isKernelThread(_process) (((const LinuxProcess*)(_process))->isKernelThread) -#define Process_isUserlandThread(_process) (_process->pid != _process->tgid) +static inline bool Process_isUserlandThread(const Process* this) { + return this->pid != this->tgid; +} extern long long btime;