aboutsummaryrefslogtreecommitdiffstats
path: root/src/poll_controller.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/poll_controller.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/poll_controller.cpp')
-rw-r--r--src/poll_controller.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/poll_controller.cpp b/src/poll_controller.cpp
index 0f46472f..dea75edf 100644
--- a/src/poll_controller.cpp
+++ b/src/poll_controller.cpp
@@ -33,10 +33,11 @@ void PollController::expireTimedout(int frame_number)
struct gprs_rlcmac_bts *bts = m_bts.bts_data();
struct gprs_rlcmac_tbf *tbf;
struct gprs_rlcmac_sba *sba, *sba2;
+ struct llist_pods *lpods;
uint32_t elapsed;
/* check for poll timeout */
- llist_for_each_entry(tbf, &bts->ul_tbfs, list) {
+ llist_pods_for_each_entry(tbf, &bts->ul_tbfs, list, lpods) {
if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED) {
elapsed = (frame_number + 2715648 - tbf->poll_fn)
% 2715648;
@@ -44,7 +45,7 @@ void PollController::expireTimedout(int frame_number)
tbf->poll_timeout();
}
}
- llist_for_each_entry(tbf, &bts->dl_tbfs, list) {
+ llist_pods_for_each_entry(tbf, &bts->dl_tbfs, list, lpods) {
if (tbf->poll_state == GPRS_RLCMAC_POLL_SCHED) {
elapsed = (frame_number + 2715648 - tbf->poll_fn)
% 2715648;