projects
/
osmocom-bb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert various debian related changes
[osmocom-bb.git]
/
src
/
statistics.c
diff --git
a/src/statistics.c
b/src/statistics.c
index
a612140
..
e28541b
100644
(file)
--- a/
src/statistics.c
+++ b/
src/statistics.c
@@
-20,7
+20,6
@@
*
*/
*
*/
-#include <sys/types.h>
#include <string.h>
#include <osmocom/core/linuxlist.h>
#include <string.h>
#include <osmocom/core/linuxlist.h>
@@
-31,9
+30,9
@@
static LLIST_HEAD(counters);
void *tall_ctr_ctx;
void *tall_ctr_ctx;
-struct
counter *
counter_alloc(const char *name)
+struct
osmo_counter *osmo_
counter_alloc(const char *name)
{
{
- struct
counter *ctr = talloc_zero(tall_ctr_ctx, struct
counter);
+ struct
osmo_counter *ctr = talloc_zero(tall_ctr_ctx, struct osmo_
counter);
if (!ctr)
return NULL;
if (!ctr)
return NULL;
@@
-44,15
+43,16
@@
struct counter *counter_alloc(const char *name)
return ctr;
}
return ctr;
}
-void
counter_free(struct
counter *ctr)
+void
osmo_counter_free(struct osmo_
counter *ctr)
{
llist_del(&ctr->list);
talloc_free(ctr);
}
{
llist_del(&ctr->list);
talloc_free(ctr);
}
-int counters_for_each(int (*handle_counter)(struct counter *, void *), void *data)
+int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *),
+ void *data)
{
{
- struct counter *ctr;
+ struct
osmo_
counter *ctr;
int rc = 0;
llist_for_each_entry(ctr, &counters, list) {
int rc = 0;
llist_for_each_entry(ctr, &counters, list) {
@@
-64,9
+64,9
@@
int counters_for_each(int (*handle_counter)(struct counter *, void *), void *dat
return rc;
}
return rc;
}
-struct
counter *
counter_get_by_name(const char *name)
+struct
osmo_counter *osmo_
counter_get_by_name(const char *name)
{
{
- struct counter *ctr;
+ struct
osmo_
counter *ctr;
llist_for_each_entry(ctr, &counters, list) {
if (!strcmp(ctr->name, name))
llist_for_each_entry(ctr, &counters, list) {
if (!strcmp(ctr->name, name))