aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-08-22 21:42:57 +0200
committerAlexander Couzens <lynxis@fe80.eu>2016-08-30 12:02:58 +0200
commite65315fb373602082b9289020ccc17f0c4b79935 (patch)
tree4c3cc78a6993954a4dcd1bd5eb36deb505a4ae4f /include
parent0318f6b6cae7a3f2d786a1caee519241d81d6745 (diff)
core/counter: add osmo_counter_dec()
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/statistics.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/core/statistics.h b/include/osmocom/core/statistics.h
index 1e472ffd..41716ccf 100644
--- a/include/osmocom/core/statistics.h
+++ b/include/osmocom/core/statistics.h
@@ -12,6 +12,12 @@ struct osmo_counter {
unsigned long previous; /*!< \brief previous value */
};
+/*! \brief Decrement counter */
+static inline void osmo_counter_dec(struct osmo_counter *ctr)
+{
+ ctr->value--;
+}
+
/*! \brief Increment counter */
static inline void osmo_counter_inc(struct osmo_counter *ctr)
{