<p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/17351">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/17351/4/src/host/trxcon/sched_trx.c">File src/host/trxcon/sched_trx.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/17351/4/src/host/trxcon/sched_trx.c@750">Patch Set #4, Line 750:</a> <code style="font-family:monospace,monospace">             if (i + 1 == n)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This should never be true? loop is condition i<n</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Let's say n = 4 (typical for xCCH) and we're doing the last iteration here, so i = 3. This is exactly when this condition is true:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  if (3 + 1 == 4)</pre><p style="white-space: pre-wrap; word-wrap: break-word;">Now let me explain why do we need that:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  X    X    X    X    X<br>  ^    ^              ^<br>  |    |              |<br>  |    |              +---- (A) Current TDMA frame (last received burst)<br>  |    +------------------- (B) First TDMA frame of a block<br>  +------------------------ (C) Last TDMA frame of a previous block</pre><p style="white-space: pre-wrap; word-wrap: break-word;">In order to get from (A) to (B), we need to shift the pointer 3 times backwards. If we leave it as is (without breaking the loop), we will shift 4 times and end up at (C).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/17351">change 17351</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmocom-bb/+/17351"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9221957297a6154edc1767a0e3753f5ee383173f </div>
<div style="display:none"> Gerrit-Change-Number: 17351 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 09 Mar 2020 10:29:02 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>