Attention is currently required from: fixeria, laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36538?usp=email )
Change subject: add osmo_stats_report_lock api ......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
I wonder why after all the discussions around atomic counters you decided to go with the presumably […]
And for the case at hand, I still belive it makes much more sense to simply use an osmo_itq to pass the related updated counters every X seconds.
The fact that the counter is atomic doesn't help with the fact that you still need to access objects which are in a llist which may be changing over time. So let's avoid problems, imho use an osmo_itq there and simply abandon this patch as we don't really need it now.
File src/core/stats.c:
https://gerrit.osmocom.org/c/libosmocore/+/36538/comment/b0a94212_a2dda1f5 PS2, Line 791: static pthread_mutex_t *g_report_lock = NULL;
just a thought, it would be far simpler to only publish this pointer on public API. […]
I think having APIs is better, it allows changing the implementation later on to whatever else.