mirror of https://github.com/xzeldon/htop.git
Further, minor cleanups to headers post-MakeHeaders
Remove leftover empty ifdef/endif pairs, whitespace. The generated htop.h file was also unused - removed.
This commit is contained in:
parent
eede79b29a
commit
8ec5d4a3a0
3
Action.h
3
Action.h
|
@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "IncSet.h"
|
#include "IncSet.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "Header.h"
|
#include "Header.h"
|
||||||
|
@ -36,7 +35,6 @@ typedef struct State_ {
|
||||||
Header* header;
|
Header* header;
|
||||||
} State;
|
} State;
|
||||||
|
|
||||||
|
|
||||||
Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess);
|
Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess);
|
||||||
|
|
||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
|
@ -49,7 +47,6 @@ Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey);
|
||||||
|
|
||||||
Htop_Reaction Action_follow(State* st);
|
Htop_Reaction Action_follow(State* st);
|
||||||
|
|
||||||
|
|
||||||
void Action_setBindings(Htop_Action* keys);
|
void Action_setBindings(Htop_Action* keys);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,7 +14,6 @@ in the source distribution for its full text.
|
||||||
#else
|
#else
|
||||||
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
|
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
|
||||||
#endif
|
#endif
|
||||||
#elif HAVE_LINUX_AFFINITY
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Process.h"
|
#include "Process.h"
|
||||||
|
@ -27,7 +26,6 @@ typedef struct Affinity_ {
|
||||||
int* cpus;
|
int* cpus;
|
||||||
} Affinity;
|
} Affinity;
|
||||||
|
|
||||||
|
|
||||||
Affinity* Affinity_new(ProcessList* pl);
|
Affinity* Affinity_new(ProcessList* pl);
|
||||||
|
|
||||||
void Affinity_delete(Affinity* this);
|
void Affinity_delete(Affinity* this);
|
||||||
|
|
|
@ -7,28 +7,10 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_LIBHWLOC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Panel.h"
|
#include "Panel.h"
|
||||||
#include "Affinity.h"
|
#include "Affinity.h"
|
||||||
#include "ProcessList.h"
|
#include "ProcessList.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBHWLOC
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBHWLOC
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBHWLOC
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern PanelClass AffinityPanel_class;
|
extern PanelClass AffinityPanel_class;
|
||||||
|
|
||||||
Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width);
|
Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width);
|
||||||
|
|
|
@ -14,7 +14,6 @@ typedef struct AvailableColumnsPanel_ {
|
||||||
Panel* columns;
|
Panel* columns;
|
||||||
} AvailableColumnsPanel;
|
} AvailableColumnsPanel;
|
||||||
|
|
||||||
|
|
||||||
extern PanelClass AvailableColumnsPanel_class;
|
extern PanelClass AvailableColumnsPanel_class;
|
||||||
|
|
||||||
AvailableColumnsPanel* AvailableColumnsPanel_new(Panel* columns);
|
AvailableColumnsPanel* AvailableColumnsPanel_new(Panel* columns);
|
||||||
|
|
|
@ -22,7 +22,6 @@ typedef struct AvailableMetersPanel_ {
|
||||||
Panel* rightPanel;
|
Panel* rightPanel;
|
||||||
} AvailableMetersPanel;
|
} AvailableMetersPanel;
|
||||||
|
|
||||||
|
|
||||||
extern PanelClass AvailableMetersPanel_class;
|
extern PanelClass AvailableMetersPanel_class;
|
||||||
|
|
||||||
AvailableMetersPanel* AvailableMetersPanel_new(Settings* settings, Header* header, Panel* leftMeters, Panel* rightMeters, ScreenManager* scr, ProcessList* pl);
|
AvailableMetersPanel* AvailableMetersPanel_new(Settings* settings, Header* header, Panel* leftMeters, Panel* rightMeters, ScreenManager* scr, ProcessList* pl);
|
||||||
|
|
|
@ -22,7 +22,6 @@ typedef enum {
|
||||||
CPU_METER_ITEMCOUNT = 9, // number of entries in this enum
|
CPU_METER_ITEMCOUNT = 9, // number of entries in this enum
|
||||||
} CPUMeterValues;
|
} CPUMeterValues;
|
||||||
|
|
||||||
|
|
||||||
extern int CPUMeter_attributes[];
|
extern int CPUMeter_attributes[];
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
|
|
2
CRT.c
2
CRT.c
|
@ -43,8 +43,6 @@ in the source distribution for its full text.
|
||||||
#define KEY_WHEELDOWN KEY_F(21)
|
#define KEY_WHEELDOWN KEY_F(21)
|
||||||
#define KEY_RECLICK KEY_F(22)
|
#define KEY_RECLICK KEY_F(22)
|
||||||
|
|
||||||
//#link curses
|
|
||||||
|
|
||||||
const char *CRT_treeStrAscii[TREE_STR_COUNT] = {
|
const char *CRT_treeStrAscii[TREE_STR_COUNT] = {
|
||||||
"-", // TREE_STR_HORZ
|
"-", // TREE_STR_HORZ
|
||||||
"|", // TREE_STR_VERT
|
"|", // TREE_STR_VERT
|
||||||
|
|
2
CRT.h
2
CRT.h
|
@ -30,8 +30,6 @@ in the source distribution for its full text.
|
||||||
#define KEY_WHEELDOWN KEY_F(21)
|
#define KEY_WHEELDOWN KEY_F(21)
|
||||||
#define KEY_RECLICK KEY_F(22)
|
#define KEY_RECLICK KEY_F(22)
|
||||||
|
|
||||||
//#link curses
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef enum TreeStr_ {
|
typedef enum TreeStr_ {
|
||||||
|
|
|
@ -21,7 +21,6 @@ typedef struct CategoriesPanel_ {
|
||||||
ProcessList* pl;
|
ProcessList* pl;
|
||||||
} CategoriesPanel;
|
} CategoriesPanel;
|
||||||
|
|
||||||
|
|
||||||
void CategoriesPanel_makeMetersPage(CategoriesPanel* this);
|
void CategoriesPanel_makeMetersPage(CategoriesPanel* this);
|
||||||
|
|
||||||
extern PanelClass CategoriesPanel_class;
|
extern PanelClass CategoriesPanel_class;
|
||||||
|
|
|
@ -16,7 +16,6 @@ typedef struct CheckItem_ {
|
||||||
bool value;
|
bool value;
|
||||||
} CheckItem;
|
} CheckItem;
|
||||||
|
|
||||||
|
|
||||||
extern ObjectClass CheckItem_class;
|
extern ObjectClass CheckItem_class;
|
||||||
|
|
||||||
CheckItem* CheckItem_newByRef(char* text, bool* ref);
|
CheckItem* CheckItem_newByRef(char* text, bool* ref);
|
||||||
|
|
|
@ -24,7 +24,6 @@ typedef struct ColorsPanel_ {
|
||||||
ScreenManager* scr;
|
ScreenManager* scr;
|
||||||
} ColorsPanel;
|
} ColorsPanel;
|
||||||
|
|
||||||
|
|
||||||
extern PanelClass ColorsPanel_class;
|
extern PanelClass ColorsPanel_class;
|
||||||
|
|
||||||
ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr);
|
ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr);
|
||||||
|
|
|
@ -17,7 +17,6 @@ typedef struct ColumnsPanel_ {
|
||||||
bool moving;
|
bool moving;
|
||||||
} ColumnsPanel;
|
} ColumnsPanel;
|
||||||
|
|
||||||
|
|
||||||
extern PanelClass ColumnsPanel_class;
|
extern PanelClass ColumnsPanel_class;
|
||||||
|
|
||||||
ColumnsPanel* ColumnsPanel_new(Settings* settings);
|
ColumnsPanel* ColumnsPanel_new(Settings* settings);
|
||||||
|
|
|
@ -18,7 +18,6 @@ typedef struct DisplayOptionsPanel_ {
|
||||||
ScreenManager* scr;
|
ScreenManager* scr;
|
||||||
} DisplayOptionsPanel;
|
} DisplayOptionsPanel;
|
||||||
|
|
||||||
|
|
||||||
extern PanelClass DisplayOptionsPanel_class;
|
extern PanelClass DisplayOptionsPanel_class;
|
||||||
|
|
||||||
DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager* scr);
|
DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager* scr);
|
||||||
|
|
|
@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef struct FunctionBar_ {
|
typedef struct FunctionBar_ {
|
||||||
|
@ -18,8 +17,6 @@ typedef struct FunctionBar_ {
|
||||||
bool staticData;
|
bool staticData;
|
||||||
} FunctionBar;
|
} FunctionBar;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FunctionBar* FunctionBar_newEnterEsc(const char* enter, const char* esc);
|
FunctionBar* FunctionBar_newEnterEsc(const char* enter, const char* esc);
|
||||||
|
|
||||||
FunctionBar* FunctionBar_new(const char* const* functions, const char* const* keys, const int* events);
|
FunctionBar* FunctionBar_new(const char* const* functions, const char* const* keys, const int* events);
|
||||||
|
|
3
Header.h
3
Header.h
|
@ -20,14 +20,11 @@ typedef struct Header_ {
|
||||||
int height;
|
int height;
|
||||||
} Header;
|
} Header;
|
||||||
|
|
||||||
|
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
#define MAX(a,b) ((a)>(b)?(a):(b))
|
#define MAX(a,b) ((a)>(b)?(a):(b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef Header_forEachColumn
|
|
||||||
#define Header_forEachColumn(this_, i_) for (int (i_)=0; (i_) < (this_)->nrColumns; ++(i_))
|
#define Header_forEachColumn(this_, i_) for (int (i_)=0; (i_) < (this_)->nrColumns; ++(i_))
|
||||||
#endif
|
|
||||||
|
|
||||||
Header* Header_new(struct ProcessList_* pl, Settings* settings, int nrColumns);
|
Header* Header_new(struct ProcessList_* pl, Settings* settings, int nrColumns);
|
||||||
|
|
||||||
|
|
2
IncSet.h
2
IncSet.h
|
@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "FunctionBar.h"
|
#include "FunctionBar.h"
|
||||||
#include "Panel.h"
|
#include "Panel.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -38,7 +37,6 @@ typedef struct IncSet_ {
|
||||||
|
|
||||||
typedef const char* (*IncMode_GetPanelValue)(Panel*, int);
|
typedef const char* (*IncMode_GetPanelValue)(Panel*, int);
|
||||||
|
|
||||||
|
|
||||||
void IncSet_reset(IncSet* this, IncType type);
|
void IncSet_reset(IncSet* this, IncType type);
|
||||||
|
|
||||||
IncSet* IncSet_new(FunctionBar* bar);
|
IncSet* IncSet_new(FunctionBar* bar);
|
||||||
|
|
|
@ -16,7 +16,6 @@ typedef struct ListItem_ {
|
||||||
bool moving;
|
bool moving;
|
||||||
} ListItem;
|
} ListItem;
|
||||||
|
|
||||||
|
|
||||||
extern ObjectClass ListItem_class;
|
extern ObjectClass ListItem_class;
|
||||||
|
|
||||||
ListItem* ListItem_new(const char* value, int key);
|
ListItem* ListItem_new(const char* value, int key);
|
||||||
|
|
|
@ -24,7 +24,6 @@ typedef bool(*MainPanel_ForeachProcessFn)(Process*, Arg);
|
||||||
|
|
||||||
#define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar)
|
#define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar)
|
||||||
|
|
||||||
|
|
||||||
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode);
|
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode);
|
||||||
|
|
||||||
void MainPanel_pidSearch(MainPanel* this, int ch);
|
void MainPanel_pidSearch(MainPanel* this, int ch);
|
||||||
|
|
|
@ -29,7 +29,7 @@ InfoScreen.c XAlloc.c
|
||||||
myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \
|
myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \
|
||||||
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
|
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
|
||||||
CPUMeter.h CRT.h MainPanel.h DisplayOptionsPanel.h FunctionBar.h \
|
CPUMeter.h CRT.h MainPanel.h DisplayOptionsPanel.h FunctionBar.h \
|
||||||
Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
|
Hashtable.h Header.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
|
||||||
BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
|
BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
|
||||||
ScreenManager.h Settings.h SignalsPanel.h StringUtils.h SwapMeter.h \
|
ScreenManager.h Settings.h SignalsPanel.h StringUtils.h SwapMeter.h \
|
||||||
TasksMeter.h UptimeMeter.h TraceScreen.h UsersTable.h Vector.h Process.h \
|
TasksMeter.h UptimeMeter.h TraceScreen.h UsersTable.h Vector.h Process.h \
|
||||||
|
|
6
Meter.h
6
Meter.h
|
@ -94,7 +94,6 @@ typedef struct GraphData_ {
|
||||||
double values[METER_BUFFER_LEN];
|
double values[METER_BUFFER_LEN];
|
||||||
} GraphData;
|
} GraphData;
|
||||||
|
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||||
#endif
|
#endif
|
||||||
|
@ -126,7 +125,6 @@ ListItem* Meter_toListItem(Meter* this, bool moving);
|
||||||
/* ---------- GraphMeterMode ---------- */
|
/* ---------- GraphMeterMode ---------- */
|
||||||
|
|
||||||
#ifdef HAVE_LIBNCURSESW
|
#ifdef HAVE_LIBNCURSESW
|
||||||
|
|
||||||
#define PIXPERROW_UTF8 4
|
#define PIXPERROW_UTF8 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -134,10 +132,6 @@ ListItem* Meter_toListItem(Meter* this, bool moving);
|
||||||
|
|
||||||
/* ---------- LEDMeterMode ---------- */
|
/* ---------- LEDMeterMode ---------- */
|
||||||
|
|
||||||
#ifdef HAVE_LIBNCURSESW
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern MeterMode* Meter_modes[];
|
extern MeterMode* Meter_modes[];
|
||||||
|
|
||||||
/* Blank meter */
|
/* Blank meter */
|
||||||
|
|
1
Object.h
1
Object.h
|
@ -45,7 +45,6 @@ typedef union {
|
||||||
void* v;
|
void* v;
|
||||||
} Arg;
|
} Arg;
|
||||||
|
|
||||||
|
|
||||||
extern ObjectClass Object_class;
|
extern ObjectClass Object_class;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -29,7 +29,6 @@ typedef struct OpenFilesScreen_ {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
} OpenFilesScreen;
|
} OpenFilesScreen;
|
||||||
|
|
||||||
|
|
||||||
extern InfoScreenClass OpenFilesScreen_class;
|
extern InfoScreenClass OpenFilesScreen_class;
|
||||||
|
|
||||||
OpenFilesScreen* OpenFilesScreen_new(Process* process);
|
OpenFilesScreen* OpenFilesScreen_new(Process* process);
|
||||||
|
|
3
Panel.c
3
Panel.c
|
@ -19,9 +19,6 @@ in the source distribution for its full text.
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
//#link curses
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||||
#endif
|
#endif
|
||||||
|
|
3
Panel.h
3
Panel.h
|
@ -7,8 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#link curses
|
|
||||||
|
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
#include "Vector.h"
|
#include "Vector.h"
|
||||||
#include "FunctionBar.h"
|
#include "FunctionBar.h"
|
||||||
|
@ -61,7 +59,6 @@ struct Panel_ {
|
||||||
|
|
||||||
#define Panel_setDefaultBar(this_) do{ (this_)->currentBar = (this_)->defaultBar; }while(0)
|
#define Panel_setDefaultBar(this_) do{ (this_)->currentBar = (this_)->defaultBar; }while(0)
|
||||||
|
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,7 +32,6 @@ typedef struct ScreenManager_ {
|
||||||
bool allowFocusChange;
|
bool allowFocusChange;
|
||||||
} ScreenManager;
|
} ScreenManager;
|
||||||
|
|
||||||
|
|
||||||
ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation orientation, const Header* header, const Settings* settings, bool owner);
|
ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation orientation, const Header* header, const Settings* settings, bool owner);
|
||||||
|
|
||||||
void ScreenManager_delete(ScreenManager* this);
|
void ScreenManager_delete(ScreenManager* this);
|
||||||
|
|
|
@ -58,10 +58,7 @@ typedef struct Settings_ {
|
||||||
bool changed;
|
bool changed;
|
||||||
} Settings;
|
} Settings;
|
||||||
|
|
||||||
#ifndef Settings_cpuId
|
|
||||||
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
|
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void Settings_delete(Settings* this);
|
void Settings_delete(Settings* this);
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,11 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
typedef struct SignalItem_ {
|
typedef struct SignalItem_ {
|
||||||
const char* name;
|
const char* name;
|
||||||
int number;
|
int number;
|
||||||
} SignalItem;
|
} SignalItem;
|
||||||
|
|
||||||
|
|
||||||
Panel* SignalsPanel_new();
|
Panel* SignalsPanel_new();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
6
Vector.h
6
Vector.h
|
@ -24,7 +24,6 @@ typedef struct Vector_ {
|
||||||
bool owner;
|
bool owner;
|
||||||
} Vector;
|
} Vector;
|
||||||
|
|
||||||
|
|
||||||
Vector* Vector_new(ObjectClass* type, bool owner, int size);
|
Vector* Vector_new(ObjectClass* type, bool owner, int size);
|
||||||
|
|
||||||
void Vector_delete(Vector* this);
|
void Vector_delete(Vector* this);
|
||||||
|
@ -37,11 +36,6 @@ int Vector_count(Vector* this);
|
||||||
|
|
||||||
void Vector_prune(Vector* this);
|
void Vector_prune(Vector* this);
|
||||||
|
|
||||||
// If I were to use only one sorting algorithm for both cases, it would probably be this one:
|
|
||||||
/*
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
void Vector_quickSort(Vector* this);
|
void Vector_quickSort(Vector* this);
|
||||||
|
|
||||||
void Vector_insertionSort(Vector* this);
|
void Vector_insertionSort(Vector* this);
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
|
|
||||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,5 +9,4 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,7 +20,6 @@ typedef struct DarwinProcess_ {
|
||||||
bool taskAccess;
|
bool taskAccess;
|
||||||
} DarwinProcess;
|
} DarwinProcess;
|
||||||
|
|
||||||
|
|
||||||
extern ProcessClass DarwinProcess_class;
|
extern ProcessClass DarwinProcess_class;
|
||||||
|
|
||||||
DarwinProcess* DarwinProcess_new(Settings* settings);
|
DarwinProcess* DarwinProcess_new(Settings* settings);
|
||||||
|
|
|
@ -37,7 +37,6 @@ typedef struct DarwinProcessList_ {
|
||||||
ZfsArcStats zfs;
|
ZfsArcStats zfs;
|
||||||
} DarwinProcessList;
|
} DarwinProcessList;
|
||||||
|
|
||||||
|
|
||||||
void ProcessList_getHostInfo(host_basic_info_data_t *p);
|
void ProcessList_getHostInfo(host_basic_info_data_t *p);
|
||||||
|
|
||||||
void ProcessList_freeCPULoadInfo(processor_cpu_load_info_t *p);
|
void ProcessList_freeCPULoadInfo(processor_cpu_load_info_t *p);
|
||||||
|
|
|
@ -8,10 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
typedef enum DragonFlyBSDProcessFields {
|
typedef enum DragonFlyBSDProcessFields {
|
||||||
// Add platform-specific fields here, with ids >= 100
|
// Add platform-specific fields here, with ids >= 100
|
||||||
JID = 100,
|
JID = 100,
|
||||||
|
@ -16,7 +15,6 @@ typedef enum DragonFlyBSDProcessFields {
|
||||||
LAST_PROCESSFIELD = 102,
|
LAST_PROCESSFIELD = 102,
|
||||||
} DragonFlyBSDProcessField;
|
} DragonFlyBSDProcessField;
|
||||||
|
|
||||||
|
|
||||||
typedef struct DragonFlyBSDProcess_ {
|
typedef struct DragonFlyBSDProcess_ {
|
||||||
Process super;
|
Process super;
|
||||||
int kernel;
|
int kernel;
|
||||||
|
@ -24,16 +22,10 @@ typedef struct DragonFlyBSDProcess_ {
|
||||||
char* jname;
|
char* jname;
|
||||||
} DragonFlyBSDProcess;
|
} DragonFlyBSDProcess;
|
||||||
|
|
||||||
|
|
||||||
#ifndef Process_isKernelThread
|
|
||||||
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef Process_isUserlandThread
|
|
||||||
//#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
//#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||||
#define Process_isUserlandThread(_process) (_process->nlwp > 1)
|
#define Process_isUserlandThread(_process) (_process->nlwp > 1)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern ProcessClass DragonFlyBSDProcess_class;
|
extern ProcessClass DragonFlyBSDProcess_class;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <kvm.h>
|
#include <kvm.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <osreldate.h>
|
#include <osreldate.h>
|
||||||
|
@ -21,17 +20,15 @@ in the source distribution for its full text.
|
||||||
#include "DragonFlyBSDProcess.h"
|
#include "DragonFlyBSDProcess.h"
|
||||||
|
|
||||||
#define JAIL_ERRMSGLEN 1024
|
#define JAIL_ERRMSGLEN 1024
|
||||||
char jail_errmsg[JAIL_ERRMSGLEN];
|
extern char jail_errmsg[JAIL_ERRMSGLEN];
|
||||||
|
|
||||||
typedef struct CPUData_ {
|
typedef struct CPUData_ {
|
||||||
|
|
||||||
double userPercent;
|
double userPercent;
|
||||||
double nicePercent;
|
double nicePercent;
|
||||||
double systemPercent;
|
double systemPercent;
|
||||||
double irqPercent;
|
double irqPercent;
|
||||||
double idlePercent;
|
double idlePercent;
|
||||||
double systemAllPercent;
|
double systemAllPercent;
|
||||||
|
|
||||||
} CPUData;
|
} CPUData;
|
||||||
|
|
||||||
typedef struct DragonFlyBSDProcessList_ {
|
typedef struct DragonFlyBSDProcessList_ {
|
||||||
|
@ -54,10 +51,8 @@ typedef struct DragonFlyBSDProcessList_ {
|
||||||
Hashtable *jails;
|
Hashtable *jails;
|
||||||
} DragonFlyBSDProcessList;
|
} DragonFlyBSDProcessList;
|
||||||
|
|
||||||
|
|
||||||
#define _UNUSED_ __attribute__((unused))
|
#define _UNUSED_ __attribute__((unused))
|
||||||
|
|
||||||
|
|
||||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||||
|
|
||||||
void ProcessList_delete(ProcessList* this);
|
void ProcessList_delete(ProcessList* this);
|
||||||
|
|
|
@ -14,7 +14,6 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
extern ProcessFieldData Process_fields[];
|
extern ProcessFieldData Process_fields[];
|
||||||
|
|
||||||
|
|
||||||
#ifndef CLAMP
|
#ifndef CLAMP
|
||||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,5 +9,4 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,15 +7,13 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
typedef enum FreeBSDProcessFields_ {
|
||||||
typedef enum FreeBSDProcessFields {
|
|
||||||
// Add platform-specific fields here, with ids >= 100
|
// Add platform-specific fields here, with ids >= 100
|
||||||
JID = 100,
|
JID = 100,
|
||||||
JAIL = 101,
|
JAIL = 101,
|
||||||
LAST_PROCESSFIELD = 102,
|
LAST_PROCESSFIELD = 102,
|
||||||
} FreeBSDProcessField;
|
} FreeBSDProcessField;
|
||||||
|
|
||||||
|
|
||||||
typedef struct FreeBSDProcess_ {
|
typedef struct FreeBSDProcess_ {
|
||||||
Process super;
|
Process super;
|
||||||
int kernel;
|
int kernel;
|
||||||
|
@ -23,15 +21,9 @@ typedef struct FreeBSDProcess_ {
|
||||||
char* jname;
|
char* jname;
|
||||||
} FreeBSDProcess;
|
} FreeBSDProcess;
|
||||||
|
|
||||||
|
|
||||||
#ifndef Process_isKernelThread
|
|
||||||
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef Process_isUserlandThread
|
|
||||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern ProcessClass FreeBSDProcess_class;
|
extern ProcessClass FreeBSDProcess_class;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "zfs/ZfsArcStats.h"
|
#include "zfs/ZfsArcStats.h"
|
||||||
|
|
||||||
#include <kvm.h>
|
#include <kvm.h>
|
||||||
|
@ -20,14 +19,12 @@ in the source distribution for its full text.
|
||||||
extern char jail_errmsg[JAIL_ERRMSGLEN];
|
extern char jail_errmsg[JAIL_ERRMSGLEN];
|
||||||
|
|
||||||
typedef struct CPUData_ {
|
typedef struct CPUData_ {
|
||||||
|
|
||||||
double userPercent;
|
double userPercent;
|
||||||
double nicePercent;
|
double nicePercent;
|
||||||
double systemPercent;
|
double systemPercent;
|
||||||
double irqPercent;
|
double irqPercent;
|
||||||
double idlePercent;
|
double idlePercent;
|
||||||
double systemAllPercent;
|
double systemAllPercent;
|
||||||
|
|
||||||
} CPUData;
|
} CPUData;
|
||||||
|
|
||||||
typedef struct FreeBSDProcessList_ {
|
typedef struct FreeBSDProcessList_ {
|
||||||
|
@ -51,7 +48,6 @@ typedef struct FreeBSDProcessList_ {
|
||||||
|
|
||||||
} FreeBSDProcessList;
|
} FreeBSDProcessList;
|
||||||
|
|
||||||
|
|
||||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||||
|
|
||||||
void ProcessList_delete(ProcessList* this);
|
void ProcessList_delete(ProcessList* this);
|
||||||
|
|
|
@ -13,7 +13,6 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
extern ProcessFieldData Process_fields[];
|
extern ProcessFieldData Process_fields[];
|
||||||
|
|
||||||
|
|
||||||
#ifndef CLAMP
|
#ifndef CLAMP
|
||||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||||
#endif
|
#endif
|
||||||
|
|
17
htop.h
17
htop.h
|
@ -1,17 +0,0 @@
|
||||||
#ifndef HEADER_htop
|
|
||||||
#define HEADER_htop
|
|
||||||
/*
|
|
||||||
htop - htop.h
|
|
||||||
(C) 2004-2011 Hisham H. Muhammad
|
|
||||||
Released under the GNU GPL, see the COPYING file
|
|
||||||
in the source distribution for its full text.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#link m
|
|
||||||
|
|
||||||
// ----------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -9,24 +9,6 @@ in the source distribution for its full text.
|
||||||
Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
|
Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SYS_POWERSUPPLY_DIR "/sys/class/power_supply"
|
|
||||||
|
|
||||||
// ----------------------------------------
|
|
||||||
// READ FROM /proc
|
|
||||||
// ----------------------------------------
|
|
||||||
|
|
||||||
// This implementation reading from from /proc/acpi is really inefficient,
|
|
||||||
// but I think this is on the way out so I did not rewrite it.
|
|
||||||
// The /sys implementation below does things the right way.
|
|
||||||
|
|
||||||
// ----------------------------------------
|
|
||||||
// READ FROM /sys
|
|
||||||
// ----------------------------------------
|
|
||||||
|
|
||||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,7 +11,6 @@ Copyright (C) 2005 Jens Axboe <jens@axboe.dk>
|
||||||
Released under the terms of the GNU General Public License version 2
|
Released under the terms of the GNU General Public License version 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
IOPRIO_CLASS_NONE,
|
IOPRIO_CLASS_NONE,
|
||||||
IOPRIO_CLASS_RT,
|
IOPRIO_CLASS_RT,
|
||||||
|
@ -36,5 +35,4 @@ typedef int IOPriority;
|
||||||
#define IOPriority_None IOPriority_tuple(IOPRIO_CLASS_NONE, 0)
|
#define IOPriority_None IOPriority_tuple(IOPRIO_CLASS_NONE, 0)
|
||||||
#define IOPriority_Idle IOPriority_tuple(IOPRIO_CLASS_IDLE, 7)
|
#define IOPriority_Idle IOPriority_tuple(IOPRIO_CLASS_IDLE, 7)
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,9 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define PROCESS_FLAG_LINUX_IOPRIO 0x0100
|
#define PROCESS_FLAG_LINUX_IOPRIO 0x0100
|
||||||
#define PROCESS_FLAG_LINUX_OPENVZ 0x0200
|
#define PROCESS_FLAG_LINUX_OPENVZ 0x0200
|
||||||
#define PROCESS_FLAG_LINUX_VSERVER 0x0400
|
#define PROCESS_FLAG_LINUX_VSERVER 0x0400
|
||||||
|
@ -141,16 +140,10 @@ typedef struct LinuxProcess_ {
|
||||||
#endif
|
#endif
|
||||||
} LinuxProcess;
|
} LinuxProcess;
|
||||||
|
|
||||||
#ifndef Process_isKernelThread
|
|
||||||
#define Process_isKernelThread(_process) (((LinuxProcess*)(_process))->isKernelThread)
|
#define Process_isKernelThread(_process) (((LinuxProcess*)(_process))->isKernelThread)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef Process_isUserlandThread
|
|
||||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* semi-global */
|
|
||||||
extern long long btime;
|
extern long long btime;
|
||||||
|
|
||||||
extern ProcessFieldData Process_fields[];
|
extern ProcessFieldData Process_fields[];
|
||||||
|
|
|
@ -7,14 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef MAJOR_IN_MKDEV
|
|
||||||
#elif defined(MAJOR_IN_SYSMACROS)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_DELAYACCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include "ProcessList.h"
|
#include "ProcessList.h"
|
||||||
#include "zfs/ZfsArcStats.h"
|
#include "zfs/ZfsArcStats.h"
|
||||||
|
|
||||||
|
@ -100,40 +92,14 @@ typedef struct LinuxProcessList_ {
|
||||||
#define PROC_LINE_LENGTH 4096
|
#define PROC_LINE_LENGTH 4096
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef CLAMP
|
#ifndef CLAMP
|
||||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_DELAYACCT
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||||
|
|
||||||
void ProcessList_delete(ProcessList* pl);
|
void ProcessList_delete(ProcessList* pl);
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_TASKSTATS
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_OPENVZ
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CGROUP
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_VSERVER
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_DELAYACCT
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ProcessList_goThroughEntries(ProcessList* super);
|
void ProcessList_goThroughEntries(ProcessList* super);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,5 +10,4 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,8 +8,7 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
typedef enum OpenBSDProcessFields_ {
|
||||||
typedef enum OpenBSDProcessFields {
|
|
||||||
// Add platform-specific fields here, with ids >= 100
|
// Add platform-specific fields here, with ids >= 100
|
||||||
LAST_PROCESSFIELD = 100,
|
LAST_PROCESSFIELD = 100,
|
||||||
} OpenBSDProcessField;
|
} OpenBSDProcessField;
|
||||||
|
@ -18,14 +17,9 @@ typedef struct OpenBSDProcess_ {
|
||||||
Process super;
|
Process super;
|
||||||
} OpenBSDProcess;
|
} OpenBSDProcess;
|
||||||
|
|
||||||
#ifndef Process_isKernelThread
|
|
||||||
#define Process_isKernelThread(_process) (_process->pgrp == 0)
|
#define Process_isKernelThread(_process) (_process->pgrp == 0)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef Process_isUserlandThread
|
|
||||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern ProcessClass OpenBSDProcess_class;
|
extern ProcessClass OpenBSDProcess_class;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <kvm.h>
|
#include <kvm.h>
|
||||||
|
|
||||||
typedef struct CPUData_ {
|
typedef struct CPUData_ {
|
||||||
|
@ -39,7 +38,6 @@ typedef struct OpenBSDProcessList_ {
|
||||||
|
|
||||||
} OpenBSDProcessList;
|
} OpenBSDProcessList;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* avoid relying on or conflicting with MIN() and MAX() in sys/param.h
|
* avoid relying on or conflicting with MIN() and MAX() in sys/param.h
|
||||||
*/
|
*/
|
||||||
|
@ -61,10 +59,6 @@ void ProcessList_delete(ProcessList* this);
|
||||||
|
|
||||||
char *OpenBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, int* basenameEnd);
|
char *OpenBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, int* basenameEnd);
|
||||||
|
|
||||||
/*
|
|
||||||
* Taken from OpenBSD's ps(1).
|
|
||||||
*/
|
|
||||||
void ProcessList_goThroughEntries(ProcessList* this);
|
void ProcessList_goThroughEntries(ProcessList* this);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,14 +14,11 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
extern ProcessFieldData Process_fields[];
|
extern ProcessFieldData Process_fields[];
|
||||||
|
|
||||||
|
|
||||||
extern ProcessField Platform_defaultFields[];
|
extern ProcessField Platform_defaultFields[];
|
||||||
|
|
||||||
extern int Platform_numberOfFields;
|
extern int Platform_numberOfFields;
|
||||||
|
|
||||||
/*
|
/* see /usr/include/sys/signal.h */
|
||||||
* See /usr/include/sys/signal.h
|
|
||||||
*/
|
|
||||||
extern const SignalItem Platform_signals[];
|
extern const SignalItem Platform_signals[];
|
||||||
|
|
||||||
extern const unsigned int Platform_numberOfSignals;
|
extern const unsigned int Platform_numberOfSignals;
|
||||||
|
@ -30,7 +27,6 @@ void Platform_setBindings(Htop_Action* keys);
|
||||||
|
|
||||||
extern MeterClass* Platform_meterTypes[];
|
extern MeterClass* Platform_meterTypes[];
|
||||||
|
|
||||||
// preserved from FreeBSD port
|
|
||||||
int Platform_getUptime();
|
int Platform_getUptime();
|
||||||
|
|
||||||
void Platform_getLoadAverage(double* one, double* five, double* fifteen);
|
void Platform_getLoadAverage(double* one, double* five, double* fifteen);
|
||||||
|
@ -41,12 +37,6 @@ double Platform_setCPUValues(Meter* this, int cpu);
|
||||||
|
|
||||||
void Platform_setMemoryValues(Meter* this);
|
void Platform_setMemoryValues(Meter* this);
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1994 Thorsten Lockert <tholo@sigmasoft.com>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Taken almost directly from OpenBSD's top(1)
|
|
||||||
*/
|
|
||||||
void Platform_setSwapValues(Meter* this);
|
void Platform_setSwapValues(Meter* this);
|
||||||
|
|
||||||
void Platform_setTasksValues(Meter* this);
|
void Platform_setTasksValues(Meter* this);
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
|
|
||||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,7 +29,6 @@ typedef struct envAccum_ {
|
||||||
char *env;
|
char *env;
|
||||||
} envAccum;
|
} envAccum;
|
||||||
|
|
||||||
|
|
||||||
extern double plat_loadavg[3];
|
extern double plat_loadavg[3];
|
||||||
|
|
||||||
extern const SignalItem Platform_signals[];
|
extern const SignalItem Platform_signals[];
|
||||||
|
|
|
@ -8,9 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@ in the source distribution for its full text.
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
#include <libproc.h>
|
#include <libproc.h>
|
||||||
|
|
||||||
typedef enum SolarisProcessFields {
|
typedef enum SolarisProcessField_ {
|
||||||
// Add platform-specific fields here, with ids >= 100
|
// Add platform-specific fields here, with ids >= 100
|
||||||
ZONEID = 100,
|
ZONEID = 100,
|
||||||
ZONE = 101,
|
ZONE = 101,
|
||||||
|
@ -25,7 +25,6 @@ typedef enum SolarisProcessFields {
|
||||||
LAST_PROCESSFIELD = 107,
|
LAST_PROCESSFIELD = 107,
|
||||||
} SolarisProcessField;
|
} SolarisProcessField;
|
||||||
|
|
||||||
|
|
||||||
typedef struct SolarisProcess_ {
|
typedef struct SolarisProcess_ {
|
||||||
Process super;
|
Process super;
|
||||||
int kernel;
|
int kernel;
|
||||||
|
@ -41,15 +40,9 @@ typedef struct SolarisProcess_ {
|
||||||
pid_t lwpid;
|
pid_t lwpid;
|
||||||
} SolarisProcess;
|
} SolarisProcess;
|
||||||
|
|
||||||
|
|
||||||
#ifndef Process_isKernelThread
|
|
||||||
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef Process_isUserlandThread
|
|
||||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern ProcessClass SolarisProcess_class;
|
extern ProcessClass SolarisProcess_class;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ typedef struct SolarisProcessList_ {
|
||||||
ZfsArcStats zfs;
|
ZfsArcStats zfs;
|
||||||
} SolarisProcessList;
|
} SolarisProcessList;
|
||||||
|
|
||||||
|
|
||||||
char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc);
|
char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc);
|
||||||
|
|
||||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||||
|
@ -63,5 +62,4 @@ int SolarisProcessList_walkproc(psinfo_t *_psinfo, lwpsinfo_t *_lwpsinfo, void *
|
||||||
|
|
||||||
void ProcessList_goThroughEntries(ProcessList* this);
|
void ProcessList_goThroughEntries(ProcessList* this);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
|
|
||||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,5 +9,4 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
void CRT_handleSIGSEGV(int sgn);
|
void CRT_handleSIGSEGV(int sgn);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,10 +11,8 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
#define Process_delete UnsupportedProcess_delete
|
#define Process_delete UnsupportedProcess_delete
|
||||||
|
|
||||||
|
|
||||||
Process* UnsupportedProcess_new(Settings* settings);
|
Process* UnsupportedProcess_new(Settings* settings);
|
||||||
|
|
||||||
void UnsupportedProcess_delete(Object* cast);
|
void UnsupportedProcess_delete(Object* cast);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,8 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||||
in the source distribution for its full text.
|
in the source distribution for its full text.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||||
|
|
||||||
void ProcessList_delete(ProcessList* this);
|
void ProcessList_delete(ProcessList* this);
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* Do not edit this file. It was automatically generated. */
|
|
||||||
|
|
||||||
#ifndef HEADER_ZfsArcMeter
|
#ifndef HEADER_ZfsArcMeter
|
||||||
#define HEADER_ZfsArcMeter
|
#define HEADER_ZfsArcMeter
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* Do not edit this file. It was automatically generated. */
|
|
||||||
|
|
||||||
#ifndef HEADER_ZfsArcStats
|
#ifndef HEADER_ZfsArcStats
|
||||||
#define HEADER_ZfsArcStats
|
#define HEADER_ZfsArcStats
|
||||||
/*
|
/*
|
||||||
|
@ -23,5 +21,4 @@ typedef struct ZfsArcStats_ {
|
||||||
unsigned long long int uncompressed;
|
unsigned long long int uncompressed;
|
||||||
} ZfsArcStats;
|
} ZfsArcStats;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* Do not edit this file. It was automatically generated. */
|
|
||||||
|
|
||||||
#ifndef HEADER_ZfsCompressedArcMeter
|
#ifndef HEADER_ZfsCompressedArcMeter
|
||||||
#define HEADER_ZfsCompressedArcMeter
|
#define HEADER_ZfsCompressedArcMeter
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* Do not edit this file. It was automatically generated. */
|
|
||||||
|
|
||||||
#ifndef HEADER_openzfs_sysctl
|
#ifndef HEADER_openzfs_sysctl
|
||||||
#define HEADER_openzfs_sysctl
|
#define HEADER_openzfs_sysctl
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue