diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 19:44:48 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-12-19 21:13:32 +0100 |
commit | 89473cc9ae950bbb5e291d1f186d372f66f66394 (patch) | |
tree | d1e21dbd0df28c00c467695711c8dde884e746a1 /Process.h | |
parent | d872e363081a892d65dede6a90721d3a2e8b0ee6 (diff) |
Rework enum ProcessField
Use only one enum instead of a global and a platform specific one.
Drop Platform_numberOfFields global variable.
Set known size of Process_fields array
Diffstat (limited to 'Process.h')
-rw-r--r-- | Process.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -13,6 +13,7 @@ in the source distribution for its full text. #include <sys/types.h> #include "Object.h" +#include "ProcessField.h" #include "RichString.h" @@ -45,6 +46,11 @@ typedef enum ProcessField_ { NLWP = 51, TGID = 52, PERCENT_NORM_CPU = 53, + + /* Platform specific fields, defined in ${platform}/ProcessField.h */ + PLATFORM_PROCESS_FIELDS + + LAST_PROCESSFIELD } ProcessField; typedef struct ProcessPidColumn_ { @@ -123,7 +129,7 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field long Process_compare(const void* v1, const void* v2); void Process_delete(Object* cast); bool Process_isThread(const Process* this); -extern ProcessFieldData Process_fields[]; +extern ProcessFieldData Process_fields[LAST_PROCESSFIELD]; extern ProcessPidColumn Process_pidColumns[]; extern char Process_pidFormat[20]; |