Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11978


Change subject: bsc: ts_as_pchan_for_each_lchan: reorder and improve 
documentation
......................................................................

bsc: ts_as_pchan_for_each_lchan: reorder and improve documentation

It is moved prior to its user in the header file.

Change-Id: I59f52401ba37b351ba3848e8e9ffb3b24c259496
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 12 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/11978/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 15158cd..4a8b7be 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -455,6 +455,18 @@
             bsc_subscr_name(lchan && lchan->conn ? lchan->conn->bsub : NULL), \
             ## args)

+/* Iterate lchans that have an FSM allocated based based on explicit pchan kind
+ * (GSM_PCHAN_* constant).
+ * Remark: PDCH related lchans are not handled in BSC but in PCU, so trying to
+ *       iterate through GSM_PCHAN_PDCH is considered a void loop.
+ */
+#define ts_as_pchan_for_each_lchan(lchan, ts, as_pchan) \
+       for (lchan = (ts)->lchan; \
+            ((lchan - (ts)->lchan) < ARRAY_SIZE((ts)->lchan)) \
+            && lchan->fi \
+            && lchan->nr < pchan_subslots(as_pchan); \
+            lchan++)
+
 /* usage:
  * struct gsm_lchan *lchan;
  * struct gsm_bts_trx_ts *ts = get_some_timeslot();
@@ -464,15 +476,6 @@
  * Iterate only those lchans that have an FSM allocated. */
 #define ts_for_each_lchan(lchan, ts) ts_as_pchan_for_each_lchan(lchan, ts, 
(ts)->pchan_is)

-/* Same as ts_for_each_lchan() but with an explicit pchan kind (GSM_PCHAN_* 
constant).
- * Iterate only those lchans that have an FSM allocated. */
-#define ts_as_pchan_for_each_lchan(lchan, ts, as_pchan) \
-       for (lchan = (ts)->lchan; \
-            ((lchan - (ts)->lchan) < ARRAY_SIZE((ts)->lchan)) \
-            && lchan->fi \
-            && lchan->nr < pchan_subslots(as_pchan); \
-            lchan++)
-
 enum lchan_activate_mode {
        FOR_NONE,
        FOR_MS_CHANNEL_REQUEST,

--
To view, visit https://gerrit.osmocom.org/11978
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I59f52401ba37b351ba3848e8e9ffb3b24c259496
Gerrit-Change-Number: 11978
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>

Reply via email to