[PATCH] libosmocore[master]: core/counter: add osmo_counter_dec()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Aug 30 10:03:12 UTC 2016


Review at  https://gerrit.osmocom.org/796

core/counter: add osmo_counter_dec()

Change-Id: I030140a45afa295c3ebc4d3ccaffd437b984f515
---
M include/osmocom/core/statistics.h
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/796/1

diff --git a/include/osmocom/core/statistics.h b/include/osmocom/core/statistics.h
index 1e472ff..41716cc 100644
--- a/include/osmocom/core/statistics.h
+++ b/include/osmocom/core/statistics.h
@@ -12,6 +12,12 @@
 	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)
 {

-- 
To view, visit https://gerrit.osmocom.org/796
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I030140a45afa295c3ebc4d3ccaffd437b984f515
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list