Bug #3467

trxcon/sched_clck.c: use CLOCK_MONOTONIC for TDMA frame timer

Added by fixeria over 1 year ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


Hi Stefan,

I was AFK and missed your messages, but now you're offline, so I will answer here.

I've been reading trxcon code today to learn more about how gsm frames are laid out
and how they are processed; the code is a surprisingly great resource for this!

Thanks. I am glad to hear that this code is helpful for other people :)
But it was not written from scratch, some parts are based on the OsmoBTS code,
and this is another great source for learning new things about GSM L1.

I also found what looks like bugs in the clock code:

This part of the code is also heavily based on the corresponding part of OsmoBTS,
but in OsmoBTS it was updated:, unlike trxcon.

I plan to write patches for this soon, just checking if you agree

Sure, thanks!

I have this task in my personal TODO list, but still have no enough time for that.
So, feel free, I will be happy to review ;)


#1 Updated by stsp over 1 year ago

The code was updated in osmo-bts-trx ( but the problematic bit of code was not fixed in that commit, it was just moved.
See for a related osmo-bts-trx fix.
(Related simply because it's another instance of the same bad time value subtraction pattern). fixes the problem in trxcon.

#2 Updated by stsp over 1 year ago

  • Subject changed from trxcon/sched_clck.c: use timerfd and CLOCK_MONOTONIC for TDMA frame timer to trxcon/sched_clck.c: use CLOCK_MONOTONIC for TDMA frame timer

#3 Updated by stsp over 1 year ago

  • Status changed from New to Resolved

Above patches have been merged.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)