Hold only a const version of the ProcessList in Meters

This commit is contained in:
Christian Göttsche
2020-10-21 21:25:50 +02:00
committed by cgzones
parent f757810f48
commit 72103e9613
13 changed files with 43 additions and 43 deletions

View File

@ -18,7 +18,7 @@ static const int ZfsArcMeter_attributes[] = {
ZFS_MFU, ZFS_MRU, ZFS_ANON, ZFS_HEADER, ZFS_OTHER
};
void ZfsArcMeter_readStats(Meter* this, ZfsArcStats* stats) {
void ZfsArcMeter_readStats(Meter* this, const ZfsArcStats* stats) {
this->total = stats->max;
this->values[0] = stats->MFU;
this->values[1] = stats->MRU;

View File

@ -11,7 +11,7 @@ in the source distribution for its full text.
#include "Meter.h"
void ZfsArcMeter_readStats(Meter* this, ZfsArcStats* stats);
void ZfsArcMeter_readStats(Meter* this, const ZfsArcStats* stats);
extern const MeterClass ZfsArcMeter_class;

View File

@ -21,7 +21,7 @@ static const int ZfsCompressedArcMeter_attributes[] = {
ZFS_COMPRESSED
};
void ZfsCompressedArcMeter_readStats(Meter* this, ZfsArcStats* stats) {
void ZfsCompressedArcMeter_readStats(Meter* this, const ZfsArcStats* stats) {
if ( stats->isCompressed ) {
this->total = stats->uncompressed;
this->values[0] = stats->compressed;

View File

@ -11,7 +11,7 @@ in the source distribution for its full text.
#include "Meter.h"
void ZfsCompressedArcMeter_readStats(Meter* this, ZfsArcStats* stats);
void ZfsCompressedArcMeter_readStats(Meter* this, const ZfsArcStats* stats);
extern const MeterClass ZfsCompressedArcMeter_class;