aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-05-29 23:57:59 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-06-02 14:17:35 +0200
commit4c89001ccbd4dfb505454ae2b5f31ac09af7848a (patch)
tree9d3e95b360192d3b91175911a39e6b0a142f77de /include
parent05154b41e6fe8cee5ea38137c02e10a5a4b7eb96 (diff)
code cleanup for all_allocated timers, no functional change
Reduce some code dup in all_allocated accounting and cosmetically prepare for upcoming performance fix. Have a struct all_allocated, allow easy re-use of function all_allocated_update(). Rename function to all_allocated_update_bsc(). Upcoming patch will also add all_allocated_update_bts(). Related: SYS#5976 Change-Id: Id7a82c65d56a87818fc35bbeedf67e2af2f89f11
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bsc_stats.h3
-rw-r--r--include/osmocom/bsc/bts.h5
-rw-r--r--include/osmocom/bsc/gsm_data.h12
3 files changed, 11 insertions, 9 deletions
diff --git a/include/osmocom/bsc/bsc_stats.h b/include/osmocom/bsc/bsc_stats.h
index 801a2c153..edd36b656 100644
--- a/include/osmocom/bsc/bsc_stats.h
+++ b/include/osmocom/bsc/bsc_stats.h
@@ -110,4 +110,5 @@ enum {
extern const struct osmo_stat_item_group_desc bsc_statg_desc;
void bsc_update_connection_stats(struct gsm_network *net);
-void bsc_update_time_cc_all_allocated(struct gsm_network *net);
+
+void all_allocated_update_bsc();
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 5a67791f5..fc3ebce12 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -637,10 +637,7 @@ struct gsm_bts {
/* At what point in the channel allocation sequence to dispatch the Immediate Assignment (Abis optimization) */
enum imm_ass_time imm_ass_time;
- struct osmo_time_cc all_allocated_sdcch;
- struct osmo_time_cc all_allocated_static_sdcch;
- struct osmo_time_cc all_allocated_tch;
- struct osmo_time_cc all_allocated_static_tch;
+ struct all_allocated all_allocated;
};
#define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i])
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 6abe94332..88c6474c9 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1203,6 +1203,13 @@ struct gsm_tz {
int dst; /* daylight savings */
};
+struct all_allocated {
+ struct osmo_time_cc sdcch;
+ struct osmo_time_cc static_sdcch;
+ struct osmo_time_cc tch;
+ struct osmo_time_cc static_tch;
+};
+
struct gsm_network {
struct osmo_plmn_id plmn;
@@ -1313,10 +1320,7 @@ struct gsm_network {
struct smlc_config *smlc;
- struct osmo_time_cc all_allocated_sdcch;
- struct osmo_time_cc all_allocated_static_sdcch;
- struct osmo_time_cc all_allocated_tch;
- struct osmo_time_cc all_allocated_static_tch;
+ struct all_allocated all_allocated;
};
struct gsm_audio_support {