diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-12-28 19:15:40 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-01 13:58:13 +0100 |
commit | ed2dbf6954b9883218f5ace1d801c0e316df912a (patch) | |
tree | 1f8a44144bacbad9ca3d7bd947a5a2c8d1cbd726 /tests | |
parent | bf49f042d432780fe37c53aed5e4e3f34ac80793 (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 'tests')
-rw-r--r-- | tests/alloc/AllocTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index d338b786..c3efd4d9 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -52,23 +52,23 @@ static gprs_rlcmac_tbf *tbf_alloc(struct gprs_rlcmac_bts *bts, static void check_tfi_usage(BTS *the_bts) { int pdch_no; - struct gprs_rlcmac_bts *bts = the_bts->bts_data(); struct gprs_rlcmac_tbf *tfi_usage[8][8][2][32] = {{{{NULL}}}}; - struct llist_head *tbf_lists[2] = { - &bts->ul_tbfs, - &bts->dl_tbfs + LListHead<gprs_rlcmac_tbf> *tbf_lists[2] = { + &the_bts->ul_tbfs(), + &the_bts->dl_tbfs() }; + LListHead<gprs_rlcmac_tbf> *pos; gprs_rlcmac_tbf *tbf; - struct llist_pods *lpods; unsigned list_idx; struct gprs_rlcmac_tbf **tbf_var; for (list_idx = 0; list_idx < ARRAY_SIZE(tbf_lists); list_idx += 1) { - llist_pods_for_each_entry(tbf, tbf_lists[list_idx], list, lpods) { + llist_for_each(pos, tbf_lists[list_idx]) { + tbf = pos->entry(); for (pdch_no = 0; pdch_no < 8; pdch_no += 1) { struct gprs_rlcmac_pdch *pdch = tbf->pdch[pdch_no]; if (pdch == NULL) |