Change in osmo-pcu[master]: ts_alloc: rename function to clraify what it does

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Nov 9 16:38:46 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/26181 )


Change subject: ts_alloc: rename function to clraify what it does
......................................................................

ts_alloc: rename function to clraify what it does

The function updates nothing, so it's misleading. It simply counts
slots, so let's call it like that.

Change-Id: I55954321d6f2b5e755177a8829512da371e934aa
---
M src/gprs_rlcmac_ts_alloc.cpp
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/81/26181/1

diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index c3709c5..dc46b84 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -661,7 +661,7 @@
  *  \param[out] slotcount Number of TS in use
  *  \param[out] avail_count Number of reserved TS
  */
-static void update_slot_counters(uint8_t slots, uint8_t reserved_slots, uint8_t *slotcount, uint8_t *avail_count)
+static void count_slots(uint8_t slots, uint8_t reserved_slots, uint8_t *slotcount, uint8_t *avail_count)
 {
 	(*slotcount) = pcu_bitcount(slots);
 	(*avail_count) = pcu_bitcount(reserved_slots);
@@ -910,7 +910,7 @@
 	/* Step 3b: Derive the slot set for a given direction */
 	if (tbf->direction == GPRS_RLCMAC_DL_TBF) {
 		dl_slots = rc;
-		update_slot_counters(dl_slots, reserved_dl_slots, &slotcount, &avail_count);
+		count_slots(dl_slots, reserved_dl_slots, &slotcount, &avail_count);
 	} else {
 		rc = allocate_usf(trx, rc, dl_slots, usf);
 		if (rc < 0)
@@ -919,7 +919,7 @@
 		ul_slots = rc;
 		reserved_ul_slots = ul_slots;
 
-		update_slot_counters(ul_slots, reserved_ul_slots, &slotcount, &avail_count);
+		count_slots(ul_slots, reserved_ul_slots, &slotcount, &avail_count);
 	}
 
 	first_ts = ffs(rc) - 1;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/26181
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I55954321d6f2b5e755177a8829512da371e934aa
Gerrit-Change-Number: 26181
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211109/8c799d0a/attachment.htm>


More information about the gerrit-log mailing list