Fix typos and document restrictions on gather argument.

Copied from Perforce
 Change: 191184
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2016-04-16 12:40:54 +01:00
parent aabe4992eb
commit 8e78fbb2f6

View file

@ -153,11 +153,11 @@ defined (in the cool variety) and compiled out if
``STATISTIC_DECL(decl)``
_`.stat.decl`: The ``STATISTIC_DECL`` macro is used to wrap a
_`.stat.decl`: The ``STATISTIC_DECL`` macro is used to wrap the
declaration of storage for a statistic. Note that the expansion
supplies the terminating semi-colin and so it must not be following by
a semi-colon in use. This is so that it can be used in structure
definitions.
supplies a terminating semi-colon and so it must not be followed by a
semi-colon in use. This is so that it can be used in structure
declarations.
``STATISTIC(gather)``
@ -169,6 +169,11 @@ check the syntax of the statement because it is expected to use fields
that have been compiled away by ``STATISTIC_DECL``, and these will
cause compilation errors.)
_`.stat.gather.effect`: The argument to the ``STATISTIC`` macro is not
executed in non-statistical varieties and must have no side effects,
except for updates to fields that are declared in ``STATISTIC_DECL``,
and telemetry output containing the values of such fields.
``STATISTIC_WRITE(format, arg)``
_`.stat.write`: The ``STATISTIC_WRITE`` macro is used in ``WriteF()``