Mark process argument of Process_isThread const

This commit is contained in:
Christian Göttsche
2020-10-07 19:02:15 +02:00
committed by cgzones
parent 7fa0f19ffd
commit 41eea8a355
17 changed files with 22 additions and 22 deletions

View File

@ -389,6 +389,6 @@ long LinuxProcess_compare(const void* v1, const void* v2) {
return (diff > 0) ? 1 : (diff < 0 ? -1 : 0);
}
bool Process_isThread(Process* this) {
bool Process_isThread(const Process* this) {
return (Process_isUserlandThread(this) || Process_isKernelThread(this));
}

View File

@ -147,7 +147,7 @@ typedef struct LinuxProcess_ {
char *secattr;
} LinuxProcess;
#define Process_isKernelThread(_process) (((LinuxProcess*)(_process))->isKernelThread)
#define Process_isKernelThread(_process) (((const LinuxProcess*)(_process))->isKernelThread)
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
@ -185,6 +185,6 @@ void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field)
long LinuxProcess_compare(const void* v1, const void* v2);
bool Process_isThread(Process* this);
bool Process_isThread(const Process* this);
#endif