Regenerate platform-dependent headers.

Closes #293.
This commit is contained in:
Hisham Muhammad 2015-10-19 17:22:54 -02:00
parent e906c0dddb
commit 78f2933e2b
7 changed files with 36 additions and 8 deletions

View File

@ -16,6 +16,10 @@ in the source distribution for its full text.
extern ProcessField Platform_defaultFields[]; extern ProcessField Platform_defaultFields[];
extern SignalItem Platform_signals[];
extern unsigned int Platform_numberOfSignals;
extern ProcessFieldData Process_fields[]; extern ProcessFieldData Process_fields[];
extern MeterClass* Platform_meterTypes[]; extern MeterClass* Platform_meterTypes[];
@ -30,6 +34,8 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen);
int Platform_getMaxPid(); int Platform_getMaxPid();
extern ProcessPidColumn Process_pidColumns[];
double Platform_setCPUValues(Meter* mtr, int cpu); double Platform_setCPUValues(Meter* mtr, int cpu);
void Platform_setMemoryValues(Meter* mtr); void Platform_setMemoryValues(Meter* mtr);

View File

@ -1,7 +1,7 @@
/* Do not edit this file. It was automatically generated. */ /* Do not edit this file. It was automatically generated. */
#ifndef HEADER_UnsupportedCRT #ifndef HEADER_FreeBSDCRT
#define HEADER_UnsupportedCRT #define HEADER_FreeBSDCRT
/* /*
htop - UnsupportedCRT.h htop - UnsupportedCRT.h
(C) 2014 Hisham H. Muhammad (C) 2014 Hisham H. Muhammad

View File

@ -12,15 +12,22 @@ 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
LAST_PROCESSFIELD = 100, JID = 100,
JAIL = 101,
LAST_PROCESSFIELD = 102,
} FreeBSDProcessField; } FreeBSDProcessField;
typedef struct FreeBSDProcess_ { typedef struct FreeBSDProcess_ {
Process super; Process super;
int kernel;
int jid;
char* jname;
} FreeBSDProcess; } FreeBSDProcess;
#ifndef Process_isKernelThread #ifndef Process_isKernelThread
#define Process_isKernelThread(_process) (_process->pgrp == 0) #define Process_isKernelThread(_process) (_process->kernel == 1)
#endif #endif
#ifndef Process_isUserlandThread #ifndef Process_isUserlandThread
@ -32,7 +39,7 @@ extern ProcessClass FreeBSDProcess_class;
extern ProcessFieldData Process_fields[]; extern ProcessFieldData Process_fields[];
extern char* Process_pidFormat; extern ProcessPidColumn Process_pidColumns[];
FreeBSDProcess* FreeBSDProcess_new(Settings* settings); FreeBSDProcess* FreeBSDProcess_new(Settings* settings);

View File

@ -11,6 +11,12 @@ in the source distribution for its full text.
#include <kvm.h> #include <kvm.h>
#include <sys/param.h>
#include <sys/jail.h>
#include <sys/uio.h>
#define JAIL_ERRMSGLEN 1024
char jail_errmsg[JAIL_ERRMSGLEN];
typedef struct CPUData_ { typedef struct CPUData_ {
unsigned long long int totalTime; unsigned long long int totalTime;
@ -32,6 +38,8 @@ void ProcessList_delete(ProcessList* this);
char* FreeBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, int* basenameEnd); char* FreeBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, int* basenameEnd);
char* FreeBSDProcessList_readJailName(struct kinfo_proc* kproc);
void ProcessList_goThroughEntries(ProcessList* this); void ProcessList_goThroughEntries(ProcessList* this);
#endif #endif

View File

@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "Action.h" #include "Action.h"
#include "BatteryMeter.h" #include "BatteryMeter.h"
#include "SignalsPanel.h"
extern ProcessFieldData Process_fields[]; extern ProcessFieldData Process_fields[];
@ -19,6 +20,10 @@ extern ProcessField Platform_defaultFields[];
extern int Platform_numberOfFields; extern int Platform_numberOfFields;
extern SignalItem Platform_signals[];
extern unsigned int Platform_numberOfSignals;
void Platform_setBindings(Htop_Action* keys); void Platform_setBindings(Htop_Action* keys);
extern MeterClass* Platform_meterTypes[]; extern MeterClass* Platform_meterTypes[];

View File

@ -1,7 +1,7 @@
/* Do not edit this file. It was automatically generated. */ /* Do not edit this file. It was automatically generated. */
#ifndef HEADER_UnsupportedCRT #ifndef HEADER_OpenBSDCRT
#define HEADER_UnsupportedCRT #define HEADER_OpenBSDCRT
/* /*
htop - UnsupportedCRT.h htop - UnsupportedCRT.h
(C) 2014 Hisham H. Muhammad (C) 2014 Hisham H. Muhammad

View File

@ -12,7 +12,6 @@ in the source distribution for its full text.
#include "Action.h" #include "Action.h"
#include "BatteryMeter.h" #include "BatteryMeter.h"
#include "SignalsPanel.h"
extern ProcessFieldData Process_fields[]; extern ProcessFieldData Process_fields[];
@ -36,6 +35,9 @@ extern ProcessField Platform_defaultFields[];
extern int Platform_numberOfFields; extern int Platform_numberOfFields;
/*
* See /usr/include/sys/signal.h
*/
extern SignalItem Platform_signals[]; extern SignalItem Platform_signals[];
extern unsigned int Platform_numberOfSignals; extern unsigned int Platform_numberOfSignals;