diff options
author | Max <msuraev@sysmocom.de> | 2017-09-28 15:56:05 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2018-01-26 12:55:29 +0100 |
commit | e9fe0e3d0621682d18d56f89f808c819db8bb5f6 (patch) | |
tree | 34cbeafb542209a18cf62a56e74b5beab94dfe93 /src/tbf.cpp | |
parent | a296118e6d2b1e42b5e51e47467881598f9101f2 (diff) |
Simplify TS alloc: adjust allocator signatures
* drop unused parameters (from both functions and structs)
* document used parameters and return values
* tighten types used for parameters
* use consistent formatting
Tests are adjusted accordingly but test results are left untouched to
avoid regressions.
Change-Id: I39d81ab64ff790b9c4c2d0312a574485cd83e755
Related: OS#2282
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 672c2964..ea3ffe34 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -500,8 +500,7 @@ int gprs_rlcmac_tbf::update() LOGP(DTBF, LOGL_DEBUG, "********** DL-TBF update **********\n"); tbf_unlink_pdch(this); - rc = bts_data->alloc_algorithm(bts_data, ms(), this, - bts_data->alloc_algorithm_curst, 0, -1); + rc = bts_data->alloc_algorithm(bts_data, ms(), this, false, -1); /* if no resource */ if (rc < 0) { LOGPTBF(this, LOGL_ERROR, "No resource after update???\n"); @@ -828,9 +827,8 @@ void gprs_rlcmac_tbf::poll_timeout() LOGPTBF(this, LOGL_ERROR, "Poll Timeout, but no event!\n"); } -static int setup_tbf(struct gprs_rlcmac_tbf *tbf, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) +static int setup_tbf(struct gprs_rlcmac_tbf *tbf, GprsMs *ms, int8_t use_trx, uint8_t ms_class, uint8_t egprs_ms_class, + bool single_slot) { int rc; struct gprs_rlcmac_bts *bts; @@ -845,8 +843,7 @@ static int setup_tbf(struct gprs_rlcmac_tbf *tbf, tbf->m_created_ts = time(NULL); tbf->set_ms_class(ms_class); /* select algorithm */ - rc = bts->alloc_algorithm(bts, ms, tbf, bts->alloc_algorithm_curst, - single_slot, use_trx); + rc = bts->alloc_algorithm(bts, ms, tbf, single_slot, use_trx); /* if no resource */ if (rc < 0) { return -1; @@ -906,9 +903,8 @@ static void setup_egprs_mode(gprs_rlcmac_bts *bts, GprsMs *ms) } } -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) +struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, uint8_t ms_class, + uint8_t egprs_ms_class, bool single_slot) { struct gprs_rlcmac_ul_tbf *tbf; int rc; @@ -995,9 +991,8 @@ static int dl_tbf_dtor(struct gprs_rlcmac_dl_tbf *tbf) return 0; } -struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) +struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, uint8_t ms_class, + uint8_t egprs_ms_class, bool single_slot) { struct gprs_rlcmac_dl_tbf *tbf; int rc; |