aboutsummaryrefslogtreecommitdiffstats
path: root/freebsd/FreeBSDProcess.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-12-07 10:26:01 +0100
committerDaniel Lange <DLange@git.local>2020-12-07 10:26:01 +0100
commit65357c8c46154de4e4eca14075bfe5523bb5fc14 (patch)
tree8f430ee5a0d5de377c4e7c94e47842a27c70d7e8 /freebsd/FreeBSDProcess.h
parentf80394a20254938142011855f2954b3f63fe5909 (diff)
downloaddebian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.gz
debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.bz2
debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.zip
New upstream version 3.0.3upstream/3.0.3
Diffstat (limited to 'freebsd/FreeBSDProcess.h')
-rw-r--r--freebsd/FreeBSDProcess.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/freebsd/FreeBSDProcess.h b/freebsd/FreeBSDProcess.h
index 897c532..8911976 100644
--- a/freebsd/FreeBSDProcess.h
+++ b/freebsd/FreeBSDProcess.h
@@ -3,10 +3,21 @@
/*
htop - FreeBSDProcess.h
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include <stdbool.h>
+
+#include "Object.h"
+#include "Process.h"
+#include "Settings.h"
+
+
+#define PROCESS_FLAG_FREEBSD_TTY 0x0100
+
+extern const char* const nodevStr;
+
typedef enum FreeBSDProcessFields_ {
// Add platform-specific fields here, with ids >= 100
JID = 100,
@@ -19,26 +30,27 @@ typedef struct FreeBSDProcess_ {
int kernel;
int jid;
char* jname;
+ const char* ttyPath;
} FreeBSDProcess;
-#define Process_isKernelThread(_process) (_process->kernel == 1)
+static inline bool Process_isKernelThread(const Process* this) {
+ return ((const FreeBSDProcess*)this)->kernel == 1;
+}
-#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
+static inline bool Process_isUserlandThread(const Process* this) {
+ return this->pid != this->tgid;
+}
-extern ProcessClass FreeBSDProcess_class;
+extern const ProcessClass FreeBSDProcess_class;
extern ProcessFieldData Process_fields[];
extern ProcessPidColumn Process_pidColumns[];
-FreeBSDProcess* FreeBSDProcess_new(Settings* settings);
+Process* FreeBSDProcess_new(const Settings* settings);
void Process_delete(Object* cast);
-void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField field);
-
-long FreeBSDProcess_compare(const void* v1, const void* v2);
-
-bool Process_isThread(Process* this);
+bool Process_isThread(const Process* this);
#endif

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