diff options
author | Richard Braun <rbraun@sceen.net> | 2014-09-20 02:14:11 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-09-20 02:14:11 +0200 |
commit | 65c9a187a9926181534939480a4034b06b10b71e (patch) | |
tree | 48d80d3d7c7c53d967fb22c2a85976a150e19e21 /kern | |
parent | 18478032a4e6b3c475a2b37227808bf5fa4a870b (diff) |
kern/evcnt: new evcnt_add function
Diffstat (limited to 'kern')
-rw-r--r-- | kern/evcnt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kern/evcnt.h b/kern/evcnt.h index a6caf96b..f585fad0 100644 --- a/kern/evcnt.h +++ b/kern/evcnt.h @@ -65,6 +65,18 @@ evcnt_inc(struct evcnt *evcnt) } /* + * Batched increment. + * + * It is the responsibility of the caller to synchronize access to the + * counter. + */ +static inline void +evcnt_add(struct evcnt *evcnt, unsigned long long delta) +{ + evcnt->count += delta; +} + +/* * Obtain the current value of the given counter. * * Since counters are 64-bits wide, retrieving them on 32-bits systems might |