acct_add_LL or acct_zero_LL Kernel Service

Purpose

Increments counters for advanced accounting.

Syntax

unsigned long long acct_add_LL(ptr, incr)
unsigned long long *ptr;
unsigned int incr;

unsigned long long acct_zero_LL(ptr)
unsigned long long *ptr;

Parameters

Item Description
ptr Address of statistic to be incremented.
incr Increment to be applied.

Description

These kernel services are special atomic increment and clear services that are designed to allow machine-independent updating of unsigned long long values. The increment service only performs an increment if advanced accounting is enabled.

The acct_add_LL kernel service adds the value associated with the incr parameter to the 64-bit counter at the address designated by the ptr parameter. The acct_zero_LL kernel service atomically zeroes the 64-bit counter.

Both routines return the previous value of the 64-bit counter. This way, the acct_zero_LL kernel service can be used to atomically get the most recent value and set the counter to NULL. Because only delta statistics are reported each interval, this capability is required by interval accounting when the accounting record is being built for a report.

Execution Environment

These kernel services can be called from either the interrupt environment or the process environment.

Return Values

These subroutines return the previous value of the location designated by the ptr parameter.