summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2019-12-21 01:09:25 -0800
committerZev Weiss <zev@bewilderbeest.net>2020-09-03 11:58:58 -0500
commita1a027b9bd833db5384d7dc65046194018eb8bfa (patch)
treec8e906c53b485435ceb79b30a3b5faa28554f0ca /Process.c
parent7734dfe55d7c005063f2682e5611fc11e9143fd9 (diff)
Axe automated header generation.
Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c139
1 files changed, 0 insertions, 139 deletions
diff --git a/Process.c b/Process.c
index 6a0d56b9..e7ab4929 100644
--- a/Process.c
+++ b/Process.c
@@ -49,145 +49,6 @@ in the source distribution for its full text.
#endif
#define PAGE_SIZE_KB ( PAGE_SIZE / ONE_K )
-/*{
-#include "Object.h"
-
-#include <sys/types.h>
-
-#define PROCESS_FLAG_IO 0x0001
-
-typedef enum ProcessFields {
- NULL_PROCESSFIELD = 0,
- PID = 1,
- COMM = 2,
- STATE = 3,
- PPID = 4,
- PGRP = 5,
- SESSION = 6,
- TTY_NR = 7,
- TPGID = 8,
- MINFLT = 10,
- MAJFLT = 12,
- PRIORITY = 18,
- NICE = 19,
- STARTTIME = 21,
- PROCESSOR = 38,
- M_SIZE = 39,
- M_RESIDENT = 40,
- ST_UID = 46,
- PERCENT_CPU = 47,
- PERCENT_MEM = 48,
- USER = 49,
- TIME = 50,
- NLWP = 51,
- TGID = 52,
-} ProcessField;
-
-typedef struct ProcessPidColumn_ {
- int id;
- const char* label;
-} ProcessPidColumn;
-
-typedef struct Process_ {
- Object super;
-
- struct Settings_* settings;
-
- unsigned long long int time;
- pid_t pid;
- pid_t ppid;
- pid_t tgid;
- char* comm;
- int commLen;
- int indent;
-
- int basenameOffset;
- bool updated;
-
- char state;
- bool tag;
- bool showChildren;
- bool show;
- unsigned int pgrp;
- unsigned int session;
- unsigned int tty_nr;
- int tpgid;
- uid_t st_uid;
- unsigned long int flags;
- int processor;
-
- float percent_cpu;
- float percent_mem;
- char* user;
-
- long int priority;
- long int nice;
- long int nlwp;
- char starttime_show[8];
- time_t starttime_ctime;
-
- long m_size;
- long m_resident;
-
- int exit_signal;
-
- unsigned long int minflt;
- unsigned long int majflt;
- #ifdef DEBUG
- long int itrealvalue;
- unsigned long int vsize;
- long int rss;
- unsigned long int rlim;
- unsigned long int startcode;
- unsigned long int endcode;
- unsigned long int startstack;
- unsigned long int kstkesp;
- unsigned long int kstkeip;
- unsigned long int signal;
- unsigned long int blocked;
- unsigned long int sigignore;
- unsigned long int sigcatch;
- unsigned long int wchan;
- unsigned long int nswap;
- unsigned long int cnswap;
- #endif
-
-} Process;
-
-typedef struct ProcessFieldData_ {
- const char* name;
- const char* title;
- const char* description;
- int flags;
-} ProcessFieldData;
-
-// Implemented in platform-specific code:
-void Process_writeField(Process* this, RichString* str, ProcessField field);
-long Process_compare(const void* v1, const void* v2);
-void Process_delete(Object* cast);
-bool Process_isThread(Process* this);
-extern ProcessFieldData Process_fields[];
-extern ProcessPidColumn Process_pidColumns[];
-extern char Process_pidFormat[20];
-
-typedef Process*(*Process_New)(struct Settings_*);
-typedef void (*Process_WriteField)(Process*, RichString*, ProcessField);
-
-typedef struct ProcessClass_ {
- const ObjectClass super;
- const Process_WriteField writeField;
-} ProcessClass;
-
-#define As_Process(this_) ((ProcessClass*)((this_)->super.klass))
-
-#define Process_getParentPid(process_) (process_->tgid == process_->pid ? process_->ppid : process_->tgid)
-
-#define Process_isChildOf(process_, pid_) (process_->tgid == pid_ || (process_->tgid == process_->pid && process_->ppid == pid_))
-
-#define Process_sortState(state) ((state) == 'I' ? 0x100 : (state))
-
-}*/
-
static int Process_getuid = -1;
#define ONE_K 1024L

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