mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
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.
|
||||
*/
|
||||
|
||||
|
||||
#include "IncSet.h"
|
||||
#include "Settings.h"
|
||||
#include "Header.h"
|
||||
@ -36,7 +35,6 @@ typedef struct State_ {
|
||||
Header* header;
|
||||
} State;
|
||||
|
||||
|
||||
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);
|
||||
|
||||
|
||||
void Action_setBindings(Htop_Action* keys);
|
||||
|
||||
#endif
|
||||
|
@ -14,7 +14,6 @@ in the source distribution for its full text.
|
||||
#else
|
||||
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
|
||||
#endif
|
||||
#elif HAVE_LINUX_AFFINITY
|
||||
#endif
|
||||
|
||||
#include "Process.h"
|
||||
@ -27,7 +26,6 @@ typedef struct Affinity_ {
|
||||
int* cpus;
|
||||
} Affinity;
|
||||
|
||||
|
||||
Affinity* Affinity_new(ProcessList* pl);
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_LIBHWLOC
|
||||
#endif
|
||||
|
||||
#include "Panel.h"
|
||||
#include "Affinity.h"
|
||||
#include "ProcessList.h"
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_LIBHWLOC
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_LIBHWLOC
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBHWLOC
|
||||
|
||||
#endif
|
||||
|
||||
extern PanelClass AffinityPanel_class;
|
||||
|
||||
Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width);
|
||||
|
@ -14,7 +14,6 @@ typedef struct AvailableColumnsPanel_ {
|
||||
Panel* columns;
|
||||
} AvailableColumnsPanel;
|
||||
|
||||
|
||||
extern PanelClass AvailableColumnsPanel_class;
|
||||
|
||||
AvailableColumnsPanel* AvailableColumnsPanel_new(Panel* columns);
|
||||
|
@ -22,7 +22,6 @@ typedef struct AvailableMetersPanel_ {
|
||||
Panel* rightPanel;
|
||||
} AvailableMetersPanel;
|
||||
|
||||
|
||||
extern PanelClass AvailableMetersPanel_class;
|
||||
|
||||
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
|
||||
} CPUMeterValues;
|
||||
|
||||
|
||||
extern int CPUMeter_attributes[];
|
||||
|
||||
#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_RECLICK KEY_F(22)
|
||||
|
||||
//#link curses
|
||||
|
||||
const char *CRT_treeStrAscii[TREE_STR_COUNT] = {
|
||||
"-", // TREE_STR_HORZ
|
||||
"|", // 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_RECLICK KEY_F(22)
|
||||
|
||||
//#link curses
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef enum TreeStr_ {
|
||||
|
@ -21,7 +21,6 @@ typedef struct CategoriesPanel_ {
|
||||
ProcessList* pl;
|
||||
} CategoriesPanel;
|
||||
|
||||
|
||||
void CategoriesPanel_makeMetersPage(CategoriesPanel* this);
|
||||
|
||||
extern PanelClass CategoriesPanel_class;
|
||||
|
@ -16,7 +16,6 @@ typedef struct CheckItem_ {
|
||||
bool value;
|
||||
} CheckItem;
|
||||
|
||||
|
||||
extern ObjectClass CheckItem_class;
|
||||
|
||||
CheckItem* CheckItem_newByRef(char* text, bool* ref);
|
||||
|
@ -24,7 +24,6 @@ typedef struct ColorsPanel_ {
|
||||
ScreenManager* scr;
|
||||
} ColorsPanel;
|
||||
|
||||
|
||||
extern PanelClass ColorsPanel_class;
|
||||
|
||||
ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr);
|
||||
|
@ -17,7 +17,6 @@ typedef struct ColumnsPanel_ {
|
||||
bool moving;
|
||||
} ColumnsPanel;
|
||||
|
||||
|
||||
extern PanelClass ColumnsPanel_class;
|
||||
|
||||
ColumnsPanel* ColumnsPanel_new(Settings* settings);
|
||||
|
@ -18,7 +18,6 @@ typedef struct DisplayOptionsPanel_ {
|
||||
ScreenManager* scr;
|
||||
} DisplayOptionsPanel;
|
||||
|
||||
|
||||
extern PanelClass DisplayOptionsPanel_class;
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct FunctionBar_ {
|
||||
@ -18,8 +17,6 @@ typedef struct FunctionBar_ {
|
||||
bool staticData;
|
||||
} FunctionBar;
|
||||
|
||||
|
||||
|
||||
FunctionBar* FunctionBar_newEnterEsc(const char* enter, const char* esc);
|
||||
|
||||
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;
|
||||
} Header;
|
||||
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) ((a)>(b)?(a):(b))
|
||||
#endif
|
||||
|
||||
#ifndef Header_forEachColumn
|
||||
#define Header_forEachColumn(this_, i_) for (int (i_)=0; (i_) < (this_)->nrColumns; ++(i_))
|
||||
#endif
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#include "FunctionBar.h"
|
||||
#include "Panel.h"
|
||||
#include <stdbool.h>
|
||||
@ -38,7 +37,6 @@ typedef struct IncSet_ {
|
||||
|
||||
typedef const char* (*IncMode_GetPanelValue)(Panel*, int);
|
||||
|
||||
|
||||
void IncSet_reset(IncSet* this, IncType type);
|
||||
|
||||
IncSet* IncSet_new(FunctionBar* bar);
|
||||
|
@ -16,7 +16,6 @@ typedef struct ListItem_ {
|
||||
bool moving;
|
||||
} ListItem;
|
||||
|
||||
|
||||
extern ObjectClass ListItem_class;
|
||||
|
||||
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)
|
||||
|
||||
|
||||
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode);
|
||||
|
||||
void MainPanel_pidSearch(MainPanel* this, int ch);
|
||||
|
@ -29,7 +29,7 @@ InfoScreen.c XAlloc.c
|
||||
myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \
|
||||
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.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 \
|
||||
ScreenManager.h Settings.h SignalsPanel.h StringUtils.h SwapMeter.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];
|
||||
} GraphData;
|
||||
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||
#endif
|
||||
@ -126,7 +125,6 @@ ListItem* Meter_toListItem(Meter* this, bool moving);
|
||||
/* ---------- GraphMeterMode ---------- */
|
||||
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
|
||||
#define PIXPERROW_UTF8 4
|
||||
#endif
|
||||
|
||||
@ -134,10 +132,6 @@ ListItem* Meter_toListItem(Meter* this, bool moving);
|
||||
|
||||
/* ---------- LEDMeterMode ---------- */
|
||||
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
|
||||
#endif
|
||||
|
||||
extern MeterMode* Meter_modes[];
|
||||
|
||||
/* Blank meter */
|
||||
|
1
Object.h
1
Object.h
@ -45,7 +45,6 @@ typedef union {
|
||||
void* v;
|
||||
} Arg;
|
||||
|
||||
|
||||
extern ObjectClass Object_class;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -29,7 +29,6 @@ typedef struct OpenFilesScreen_ {
|
||||
pid_t pid;
|
||||
} OpenFilesScreen;
|
||||
|
||||
|
||||
extern InfoScreenClass OpenFilesScreen_class;
|
||||
|
||||
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 <assert.h>
|
||||
|
||||
//#link curses
|
||||
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||
#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.
|
||||
*/
|
||||
|
||||
//#link curses
|
||||
|
||||
#include "Object.h"
|
||||
#include "Vector.h"
|
||||
#include "FunctionBar.h"
|
||||
@ -61,7 +59,6 @@ struct Panel_ {
|
||||
|
||||
#define Panel_setDefaultBar(this_) do{ (this_)->currentBar = (this_)->defaultBar; }while(0)
|
||||
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||
#endif
|
||||
|
@ -32,7 +32,6 @@ typedef struct ScreenManager_ {
|
||||
bool allowFocusChange;
|
||||
} ScreenManager;
|
||||
|
||||
|
||||
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);
|
||||
|
@ -58,10 +58,7 @@ typedef struct Settings_ {
|
||||
bool changed;
|
||||
} Settings;
|
||||
|
||||
#ifndef Settings_cpuId
|
||||
#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
|
||||
#endif
|
||||
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
typedef struct SignalItem_ {
|
||||
const char* name;
|
||||
int number;
|
||||
} SignalItem;
|
||||
|
||||
|
||||
Panel* SignalsPanel_new();
|
||||
|
||||
#endif
|
||||
|
6
Vector.h
6
Vector.h
@ -24,7 +24,6 @@ typedef struct Vector_ {
|
||||
bool owner;
|
||||
} Vector;
|
||||
|
||||
|
||||
Vector* Vector_new(ObjectClass* type, bool owner, int size);
|
||||
|
||||
void Vector_delete(Vector* this);
|
||||
@ -37,11 +36,6 @@ int Vector_count(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_insertionSort(Vector* this);
|
||||
|
@ -3,5 +3,4 @@
|
||||
|
||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -9,5 +9,4 @@ in the source distribution for its full text.
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -20,7 +20,6 @@ typedef struct DarwinProcess_ {
|
||||
bool taskAccess;
|
||||
} DarwinProcess;
|
||||
|
||||
|
||||
extern ProcessClass DarwinProcess_class;
|
||||
|
||||
DarwinProcess* DarwinProcess_new(Settings* settings);
|
||||
|
@ -37,7 +37,6 @@ typedef struct DarwinProcessList_ {
|
||||
ZfsArcStats zfs;
|
||||
} DarwinProcessList;
|
||||
|
||||
|
||||
void ProcessList_getHostInfo(host_basic_info_data_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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
#endif
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
|
||||
typedef enum DragonFlyBSDProcessFields {
|
||||
// Add platform-specific fields here, with ids >= 100
|
||||
JID = 100,
|
||||
@ -16,7 +15,6 @@ typedef enum DragonFlyBSDProcessFields {
|
||||
LAST_PROCESSFIELD = 102,
|
||||
} DragonFlyBSDProcessField;
|
||||
|
||||
|
||||
typedef struct DragonFlyBSDProcess_ {
|
||||
Process super;
|
||||
int kernel;
|
||||
@ -24,16 +22,10 @@ typedef struct DragonFlyBSDProcess_ {
|
||||
char* jname;
|
||||
} DragonFlyBSDProcess;
|
||||
|
||||
|
||||
#ifndef Process_isKernelThread
|
||||
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
||||
#endif
|
||||
|
||||
#ifndef Process_isUserlandThread
|
||||
//#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
#define Process_isUserlandThread(_process) (_process->nlwp > 1)
|
||||
#endif
|
||||
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <osreldate.h>
|
||||
@ -21,17 +20,15 @@ in the source distribution for its full text.
|
||||
#include "DragonFlyBSDProcess.h"
|
||||
|
||||
#define JAIL_ERRMSGLEN 1024
|
||||
char jail_errmsg[JAIL_ERRMSGLEN];
|
||||
extern char jail_errmsg[JAIL_ERRMSGLEN];
|
||||
|
||||
typedef struct CPUData_ {
|
||||
|
||||
double userPercent;
|
||||
double nicePercent;
|
||||
double systemPercent;
|
||||
double irqPercent;
|
||||
double idlePercent;
|
||||
double systemAllPercent;
|
||||
|
||||
} CPUData;
|
||||
|
||||
typedef struct DragonFlyBSDProcessList_ {
|
||||
@ -54,10 +51,8 @@ typedef struct DragonFlyBSDProcessList_ {
|
||||
Hashtable *jails;
|
||||
} DragonFlyBSDProcessList;
|
||||
|
||||
|
||||
#define _UNUSED_ __attribute__((unused))
|
||||
|
||||
|
||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||
|
||||
void ProcessList_delete(ProcessList* this);
|
||||
|
@ -14,7 +14,6 @@ in the source distribution for its full text.
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||
#endif
|
||||
|
@ -9,5 +9,4 @@ in the source distribution for its full text.
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -7,15 +7,13 @@ Released under the GNU GPL, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
|
||||
typedef enum FreeBSDProcessFields {
|
||||
typedef enum FreeBSDProcessFields_ {
|
||||
// Add platform-specific fields here, with ids >= 100
|
||||
JID = 100,
|
||||
JAIL = 101,
|
||||
LAST_PROCESSFIELD = 102,
|
||||
} FreeBSDProcessField;
|
||||
|
||||
|
||||
typedef struct FreeBSDProcess_ {
|
||||
Process super;
|
||||
int kernel;
|
||||
@ -23,15 +21,9 @@ typedef struct FreeBSDProcess_ {
|
||||
char* jname;
|
||||
} FreeBSDProcess;
|
||||
|
||||
|
||||
#ifndef Process_isKernelThread
|
||||
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
||||
#endif
|
||||
|
||||
#ifndef Process_isUserlandThread
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
#endif
|
||||
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#include "zfs/ZfsArcStats.h"
|
||||
|
||||
#include <kvm.h>
|
||||
@ -20,14 +19,12 @@ in the source distribution for its full text.
|
||||
extern char jail_errmsg[JAIL_ERRMSGLEN];
|
||||
|
||||
typedef struct CPUData_ {
|
||||
|
||||
double userPercent;
|
||||
double nicePercent;
|
||||
double systemPercent;
|
||||
double irqPercent;
|
||||
double idlePercent;
|
||||
double systemAllPercent;
|
||||
|
||||
} CPUData;
|
||||
|
||||
typedef struct FreeBSDProcessList_ {
|
||||
@ -51,7 +48,6 @@ typedef struct FreeBSDProcessList_ {
|
||||
|
||||
} FreeBSDProcessList;
|
||||
|
||||
|
||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||
|
||||
void ProcessList_delete(ProcessList* this);
|
||||
|
@ -13,7 +13,6 @@ in the source distribution for its full text.
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||
#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).
|
||||
*/
|
||||
|
||||
#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);
|
||||
|
||||
#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
|
||||
*/
|
||||
|
||||
|
||||
enum {
|
||||
IOPRIO_CLASS_NONE,
|
||||
IOPRIO_CLASS_RT,
|
||||
@ -36,5 +35,4 @@ typedef int IOPriority;
|
||||
#define IOPriority_None IOPriority_tuple(IOPRIO_CLASS_NONE, 0)
|
||||
#define IOPriority_Idle IOPriority_tuple(IOPRIO_CLASS_IDLE, 7)
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -7,9 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
#endif
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
#endif
|
||||
|
@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
|
||||
#define PROCESS_FLAG_LINUX_IOPRIO 0x0100
|
||||
#define PROCESS_FLAG_LINUX_OPENVZ 0x0200
|
||||
#define PROCESS_FLAG_LINUX_VSERVER 0x0400
|
||||
@ -141,16 +140,10 @@ typedef struct LinuxProcess_ {
|
||||
#endif
|
||||
} LinuxProcess;
|
||||
|
||||
#ifndef Process_isKernelThread
|
||||
#define Process_isKernelThread(_process) (((LinuxProcess*)(_process))->isKernelThread)
|
||||
#endif
|
||||
|
||||
#ifndef Process_isUserlandThread
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
#endif
|
||||
|
||||
|
||||
/* semi-global */
|
||||
extern long long btime;
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifdef MAJOR_IN_MKDEV
|
||||
#elif defined(MAJOR_IN_SYSMACROS)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DELAYACCT
|
||||
#endif
|
||||
|
||||
|
||||
#include "ProcessList.h"
|
||||
#include "zfs/ZfsArcStats.h"
|
||||
|
||||
@ -100,40 +92,14 @@ typedef struct LinuxProcessList_ {
|
||||
#define PROC_LINE_LENGTH 4096
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DELAYACCT
|
||||
|
||||
#endif
|
||||
|
||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
@ -10,5 +10,4 @@ in the source distribution for its full text.
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -8,8 +8,7 @@ Released under the GNU GPL, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
|
||||
typedef enum OpenBSDProcessFields {
|
||||
typedef enum OpenBSDProcessFields_ {
|
||||
// Add platform-specific fields here, with ids >= 100
|
||||
LAST_PROCESSFIELD = 100,
|
||||
} OpenBSDProcessField;
|
||||
@ -18,14 +17,9 @@ typedef struct OpenBSDProcess_ {
|
||||
Process super;
|
||||
} OpenBSDProcess;
|
||||
|
||||
#ifndef Process_isKernelThread
|
||||
#define Process_isKernelThread(_process) (_process->pgrp == 0)
|
||||
#endif
|
||||
|
||||
#ifndef Process_isUserlandThread
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
#endif
|
||||
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
|
||||
#include <kvm.h>
|
||||
|
||||
typedef struct CPUData_ {
|
||||
@ -39,7 +38,6 @@ typedef struct OpenBSDProcessList_ {
|
||||
|
||||
} OpenBSDProcessList;
|
||||
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
/*
|
||||
* Taken from OpenBSD's ps(1).
|
||||
*/
|
||||
void ProcessList_goThroughEntries(ProcessList* this);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -14,14 +14,11 @@ in the source distribution for its full text.
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
|
||||
extern int Platform_numberOfFields;
|
||||
|
||||
/*
|
||||
* See /usr/include/sys/signal.h
|
||||
*/
|
||||
/* see /usr/include/sys/signal.h */
|
||||
extern const SignalItem Platform_signals[];
|
||||
|
||||
extern const unsigned int Platform_numberOfSignals;
|
||||
@ -30,7 +27,6 @@ void Platform_setBindings(Htop_Action* keys);
|
||||
|
||||
extern MeterClass* Platform_meterTypes[];
|
||||
|
||||
// preserved from FreeBSD port
|
||||
int Platform_getUptime();
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
* 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_setTasksValues(Meter* this);
|
||||
|
@ -3,5 +3,4 @@
|
||||
|
||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -29,7 +29,6 @@ typedef struct envAccum_ {
|
||||
char *env;
|
||||
} envAccum;
|
||||
|
||||
|
||||
extern double plat_loadavg[3];
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
#endif
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@ in the source distribution for its full text.
|
||||
#include <sys/proc.h>
|
||||
#include <libproc.h>
|
||||
|
||||
typedef enum SolarisProcessFields {
|
||||
typedef enum SolarisProcessField_ {
|
||||
// Add platform-specific fields here, with ids >= 100
|
||||
ZONEID = 100,
|
||||
ZONE = 101,
|
||||
@ -25,7 +25,6 @@ typedef enum SolarisProcessFields {
|
||||
LAST_PROCESSFIELD = 107,
|
||||
} SolarisProcessField;
|
||||
|
||||
|
||||
typedef struct SolarisProcess_ {
|
||||
Process super;
|
||||
int kernel;
|
||||
@ -41,15 +40,9 @@ typedef struct SolarisProcess_ {
|
||||
pid_t lwpid;
|
||||
} SolarisProcess;
|
||||
|
||||
|
||||
#ifndef Process_isKernelThread
|
||||
#define Process_isKernelThread(_process) (_process->kernel == 1)
|
||||
#endif
|
||||
|
||||
#ifndef Process_isUserlandThread
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
#endif
|
||||
|
||||
|
||||
extern ProcessClass SolarisProcess_class;
|
||||
|
||||
|
@ -46,7 +46,6 @@ typedef struct SolarisProcessList_ {
|
||||
ZfsArcStats zfs;
|
||||
} SolarisProcessList;
|
||||
|
||||
|
||||
char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -3,5 +3,4 @@
|
||||
|
||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -9,5 +9,4 @@ in the source distribution for its full text.
|
||||
|
||||
void CRT_handleSIGSEGV(int sgn);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -11,10 +11,8 @@ in the source distribution for its full text.
|
||||
|
||||
#define Process_delete UnsupportedProcess_delete
|
||||
|
||||
|
||||
Process* UnsupportedProcess_new(Settings* settings);
|
||||
|
||||
void UnsupportedProcess_delete(Object* cast);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -7,8 +7,6 @@ Released under the GNU GPL, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
|
||||
|
||||
void ProcessList_delete(ProcessList* this);
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* Do not edit this file. It was automatically generated. */
|
||||
|
||||
#ifndef HEADER_ZfsArcMeter
|
||||
#define HEADER_ZfsArcMeter
|
||||
/*
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* Do not edit this file. It was automatically generated. */
|
||||
|
||||
#ifndef HEADER_ZfsArcStats
|
||||
#define HEADER_ZfsArcStats
|
||||
/*
|
||||
@ -23,5 +21,4 @@ typedef struct ZfsArcStats_ {
|
||||
unsigned long long int uncompressed;
|
||||
} ZfsArcStats;
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* Do not edit this file. It was automatically generated. */
|
||||
|
||||
#ifndef HEADER_ZfsCompressedArcMeter
|
||||
#define HEADER_ZfsCompressedArcMeter
|
||||
/*
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* Do not edit this file. It was automatically generated. */
|
||||
|
||||
#ifndef HEADER_openzfs_sysctl
|
||||
#define HEADER_openzfs_sysctl
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user