diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-05-07 12:43:04 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-05-07 13:00:51 +0200 |
commit | 220abab3fa037e49188cc655084a26d3c3c44fd4 (patch) | |
tree | 11f4637df8e1873e307078e761b819905e0f68a5 /src/statistics.c | |
parent | 9111d930a5586cb97ed4aca36234a638eb23bb55 (diff) |
statistics: use namespace prefix osmo_counter*
Summary of changes:
s/struct counter/struct osmo_counter/g
s/counter_inc/osmo_counter_inc/g
s/counter_get/osmo_counter_get/g
s/counter_reset/osmo_counter_reset/g
s/counter_alloc/osmo_counter_alloc/g
s/counter_free/osmo_counter_free/g
s/counters_for_each/osmo_counters_for_each/g
Diffstat (limited to 'src/statistics.c')
-rw-r--r-- | src/statistics.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/statistics.c b/src/statistics.c index 83bb6ed3..e28541ba 100644 --- a/src/statistics.c +++ b/src/statistics.c @@ -30,9 +30,9 @@ static LLIST_HEAD(counters); 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; @@ -43,15 +43,16 @@ struct counter *counter_alloc(const char *name) return ctr; } -void counter_free(struct counter *ctr) +void osmo_counter_free(struct osmo_counter *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) { @@ -63,9 +64,9 @@ int counters_for_each(int (*handle_counter)(struct counter *, void *), void *dat 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)) |