aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_sched.cpp
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-07-30 13:25:19 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-30 18:27:30 +0200
commit1b3864fc472ed82ad35625c8d950d0711a8aa3d6 (patch)
treed00053cea4ec21a6683d444ca9e490418aece031 /src/gprs_rlcmac_sched.cpp
parent4bbe3349c28c33ad8b7f4f526696a41535ef30e7 (diff)
tbf: Use plain old data structure (PODS) for llist management
The PODS struct has a back pointer to access the actual object. llist_pods_for_each_entry traverses the list of struct llist_pods and makes the entry available (through the back pointer). Ticket: SYS#389 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_rlcmac_sched.cpp')
-rw-r--r--src/gprs_rlcmac_sched.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 92e97ece..dab38d83 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -31,6 +31,7 @@ static uint32_t sched_poll(struct gprs_rlcmac_bts *bts,
struct gprs_rlcmac_tbf **ul_ack_tbf)
{
struct gprs_rlcmac_tbf *tbf;
+ struct llist_pods *lpods;
uint32_t poll_fn;
/* check special TBF for events */
@@ -38,7 +39,7 @@ static uint32_t sched_poll(struct gprs_rlcmac_bts *bts,
if ((block_nr % 3) == 2)
poll_fn ++;
poll_fn = poll_fn % 2715648;
- llist_for_each_entry(tbf, &bts->ul_tbfs, list) {
+ llist_pods_for_each_entry(tbf, &bts->ul_tbfs, list, lpods) {
/* this trx, this ts */
if (tbf->trx->trx_no != trx || tbf->control_ts != ts)
continue;
@@ -54,7 +55,7 @@ static uint32_t sched_poll(struct gprs_rlcmac_bts *bts,
*ul_ass_tbf = tbf;
#warning "Is this supposed to be fair? The last TBF for each wins? Maybe use llist_add_tail and skip once we have all states?"
}
- llist_for_each_entry(tbf, &bts->dl_tbfs, list) {
+ llist_pods_for_each_entry(tbf, &bts->dl_tbfs, list, lpods) {
/* this trx, this ts */
if (tbf->trx->trx_no != trx || tbf->control_ts != ts)
continue;