diff options
author | fraggerfox <santhosh.raju@gmail.com> | 2021-03-15 13:14:39 +0530 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-06-26 12:18:37 +0200 |
commit | 4b49de44a8659674c6e92ba70e0c1930b2b9315b (patch) | |
tree | d831fd16f5a13843766d9ae18a0060ff1b3d5b39 /netbsd/NetBSDProcess.h | |
parent | 30dc4a28125e7199a51abde86af7b73027fa0bd2 (diff) |
Add NetBSD platform support without procfs dependency
- TODO, clean up the code base and update comments in code.
Diffstat (limited to 'netbsd/NetBSDProcess.h')
-rw-r--r-- | netbsd/NetBSDProcess.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/netbsd/NetBSDProcess.h b/netbsd/NetBSDProcess.h new file mode 100644 index 00000000..16b01ff6 --- /dev/null +++ b/netbsd/NetBSDProcess.h @@ -0,0 +1,36 @@ +#ifndef HEADER_NetBSDProcess +#define HEADER_NetBSDProcess +/* +htop - NetBSDProcess.h +(C) 2015 Hisham H. Muhammad +(C) 2015 Michael McConville +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" + + +typedef struct NetBSDProcess_ { + Process super; +} NetBSDProcess; + +#define Process_isKernelThread(_process) (_process->pgrp == 0) + +#define Process_isUserlandThread(_process) (_process->pid != _process->tgid) + +extern const ProcessClass NetBSDProcess_class; + +extern const ProcessFieldData Process_fields[LAST_PROCESSFIELD]; + +Process* NetBSDProcess_new(const Settings* settings); + +void Process_delete(Object* cast); + +bool Process_isThread(const Process* this); + +#endif |