-- File: StatsHot.mesa, Last Edit: HGM February 17, 1979 9:55 PM
-- Copyright Xerox Corporation 1979, 1980
DIRECTORY
StatsDefs: FROM "StatsDefs" USING [StatCounterIndex],
StatsPrivateDefs: FROM "StatsPrivateDefs" USING [statLock];
StatsHot: MONITOR LOCKS StatsPrivateDefs.statLock
IMPORTS StatsPrivateDefs
EXPORTS StatsDefs, StatsPrivateDefs =
BEGIN OPEN StatsDefs;
-- These are the master counters. They are the only ones that get bumped by StatIncr and StatBump. The numbers that StatSince prints out are obtained by subtracting two copies of statGrand.
statGrand: PUBLIC ARRAY StatCounterIndex OF LONG CARDINAL;
StatIncr: PUBLIC ENTRY PROCEDURE [which: StatCounterIndex] =
BEGIN
statGrand[which] ← statGrand[which]+1;
END;
StatBump: PUBLIC ENTRY PROCEDURE [which: StatCounterIndex, howmuch: CARDINAL] =
BEGIN
statGrand[which] ← statGrand[which]+howmuch;
END;
-- initialization
END.