From eaf11cc12a1aa4b050a8a1e7ea3770d3d9c81e95 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:29 +0200 Subject: Imported Upstream version 1.0 --- ProcessList.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'ProcessList.h') diff --git a/ProcessList.h b/ProcessList.h index fdbf420..641a08c 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -56,7 +56,26 @@ in the source distribution for its full text. #define MAX_READ 2048 #endif +#ifndef ProcessList_cpuId +#define ProcessList_cpuId(pl, cpu) ((pl)->countCPUsFromZero ? (cpu) : (cpu)+1) +#endif +typedef enum TreeStr_ { + TREE_STR_HORZ, + TREE_STR_VERT, + TREE_STR_RTEE, + TREE_STR_BEND, + TREE_STR_TEND, + TREE_STR_OPEN, + TREE_STR_SHUT, + TREE_STR_COUNT +} TreeStr; + +typedef enum TreeType_ { + TREE_TYPE_AUTO, + TREE_TYPE_ASCII, + TREE_TYPE_UTF8, +} TreeType; typedef struct CPUData_ { unsigned long long int totalTime; @@ -98,6 +117,10 @@ typedef struct ProcessList_ { int kernelThreads; int runningTasks; + #ifdef HAVE_LIBHWLOC + hwloc_topology_t topology; + bool topologyOk; + #endif CPUData* cpus; unsigned long long int totalMem; @@ -124,9 +147,16 @@ typedef struct ProcessList_ { bool highlightMegabytes; bool highlightThreads; bool detailedCPUTime; + bool countCPUsFromZero; + const char **treeStr; } ProcessList; + +extern const char *ProcessList_treeStrAscii[TREE_STR_COUNT]; + +extern const char *ProcessList_treeStrUtf8[TREE_STR_COUNT]; + ProcessList* ProcessList_new(UsersTable* usersTable); void ProcessList_delete(ProcessList* this); -- cgit v1.2.3