aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-28 19:15:40 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-01 13:58:13 +0100
commited2dbf6954b9883218f5ace1d801c0e316df912a (patch)
tree1f8a44144bacbad9ca3d7bd947a5a2c8d1cbd726 /src/bts.h
parentbf49f042d432780fe37c53aed5e4e3f34ac80793 (diff)
tbf: Use LListHead instead of llist_pods
LListHead does basically the same like llist_pods, but more C++ish and with type safety. This commit turns the former list field of gprs_rlcmac_tbf into a private field, provides accessors, moves the related code from pcu_vty.c to pcu_vty_functions.cpp, and removes the llist_pods type and related code. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.h')
-rw-r--r--src/bts.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/bts.h b/src/bts.h
index 45432ea..704a5be 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -109,7 +109,8 @@ private:
void rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *, uint32_t fn);
void rcv_resource_request(Packet_Resource_Request_t *t, uint32_t fn);
void rcv_measurement_report(Packet_Measurement_Report_t *t, uint32_t fn);
- gprs_rlcmac_tbf *tbf_from_list_by_tfi(struct llist_head *tbf_list, uint8_t tfi,
+ gprs_rlcmac_tbf *tbf_from_list_by_tfi(
+ LListHead<gprs_rlcmac_tbf> *tbf_list, uint8_t tfi,
enum gprs_rlcmac_tbf_direction dir);
gprs_rlcmac_tbf *tbf_by_tfi(uint8_t tfi,
enum gprs_rlcmac_tbf_direction dir);
@@ -185,12 +186,6 @@ struct gprs_rlcmac_bts {
struct {int16_t low; int16_t high;} cs_lqual_ranges[4];
uint16_t cs_downgrade_threshold; /* downgrade if less packets left (DL) */
- /* TBF handling, make private or move into TBFController */
- /* list of uplink TBFs */
- struct llist_head ul_tbfs;
- /* list of downlink TBFs */
- struct llist_head dl_tbfs;
-
/* State for dynamic algorithm selection */
int multislot_disabled;
@@ -319,6 +314,8 @@ public:
struct rate_ctr_group *rate_counters() const;
struct osmo_stat_item_group *stat_items() const;
+ LListHead<gprs_rlcmac_tbf>& ul_tbfs();
+ LListHead<gprs_rlcmac_tbf>& dl_tbfs();
private:
int m_cur_fn;
int m_cur_blk_fn;
@@ -330,6 +327,11 @@ private:
GprsMsStorage m_ms_store;
+ /* list of uplink TBFs */
+ LListHead<gprs_rlcmac_tbf> m_ul_tbfs;
+ /* list of downlink TBFs */
+ LListHead<gprs_rlcmac_tbf> m_dl_tbfs;
+
private:
/* disable copying to avoid slicing */
BTS(const BTS&);
@@ -361,6 +363,16 @@ inline GprsMs *BTS::ms_by_imsi(const char *imsi)
return ms_store().get_ms(0, 0, imsi);
}
+inline LListHead<gprs_rlcmac_tbf>& BTS::ul_tbfs()
+{
+ return m_ul_tbfs;
+}
+
+inline LListHead<gprs_rlcmac_tbf>& BTS::dl_tbfs()
+{
+ return m_dl_tbfs;
+}
+
inline BTS *gprs_rlcmac_pdch::bts() const
{
return trx->bts;