libosmocore 1.11.0.26-c59d.202505072026
Osmocom core library
Loading...
Searching...
No Matches
osmo_use_count_entry Struct Reference

One named counter in the list managed by osmo_use_count. More...

#include <use_count.h>

Data Fields

struct llist_head entry
 Entry in osmo_use_count->use_counts.
 
struct osmo_use_countuse_count
 Parent use count and backpointer to the talloc_object.
 
const charuse
 Use token string that was passed to osmo_use_count_get_put().
 
int32_t count
 Current use count amount for only this use token string.
 

Detailed Description

One named counter in the list managed by osmo_use_count.

Gets created as necessary by osmo_use_count_get_put(). The total current use count of an object is the sum of all individual osmo_use_count_entry->count.

 object            <--backpointer-+
t|  .osmo_use_count               |
a|     .talloc_object ------------+
l|     .use_counts llist:          use   count
l|->      - osmo_use_count_entry: "foo"  1
o|->      - osmo_use_count_entry: "bar"  3
c|->      - osmo_use_count_entry: "baz"  0  (currently unused entry)

Field Documentation

◆ count

int32_t osmo_use_count_entry::count

Current use count amount for only this use token string.

If zero, this entry is currently unused and kept around to avoid frequent de-/allocation.

Referenced by osmo_use_count_to_str_buf().

◆ entry

struct llist_head osmo_use_count_entry::entry

◆ use

◆ use_count

struct osmo_use_count* osmo_use_count_entry::use_count

Parent use count and backpointer to the talloc_object.

Referenced by osmo_use_count_make_static_entries().


The documentation for this struct was generated from the following file: