ok, next time i will split the patches for easier understanding. if you require splitting
of my first patch, let me know.
for better understanding and review, i will explain the usleep replacement patch again.
only commit it, if you fully understand the changes. the usleep is replaced by a timer,
one for each time slot (signalling only ts).
1. whenever data is queued into the tx-queue, a tx-delay timer is checked:
- the timer is not running: mISDN write event is triggered with BSC_FD_WRITE flag on file
descriptor.
- the timer is running: nothing is triggered, because we still have to wait until the
tx-timer timed out
2. whenever a time out occurrs:
- the BSC_FD_WRITE flag is set to trigger write event, even if tx-queue is empty.
3. whenever a write event is triggered: if it is ok to write (select() indicated that
writing is possible), the tx-queue is checked:
- if queue is empty: nothing is done, delay timer remains disabled, no BSC_FD_WRITE flag
is set.
- if queue is not empty: the first message is dequeued and sent to mISDN. the tx-delay
timer is started and set for next write event.
special cases:
- if tx-queue is not empty, delay timer is not running and BSC_FD_WRITE flag is set (e.g.
right after timeout event), subsequent data is queued and BSC_FD_WRITE flag remains set.
- if tx-timer times out, but there is no data in the tx-queue, the BSC_FD_WRITE flag will
be set. the write event handler always checks for data in the tx-queue. if it is empty,
the delay timer will not be started and the BSC_FD_WRITE flag will be cleared.
- the timers is not cleared on release of libbsc data structures. i expect all times to be
removed on release of libbsc also.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im
Auftrag von Holger Freyther
Gesendet: Donnerstag, 23. April 2009 00:11
An: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: first patch: mISDN handling
On Wednesday 22 April 2009 15:44:44 Holger Freyther wrote:
On Wednesday 22 April 2009 15:25:59 Andreas.Eversberg
wrote:
i just want to know, if my recent patch arrived
on this list (my last
mail), because my first mail formatting was detected as spam. i see no
reaction to my last mail.
Yes, I waited for Harald to respond as he is the boss. My taste regarding
patches is very special and I prefer the smaller patches... e.g. I would
like to have separate patches for things like LAC, auto release of layer2,
and it is hard for me to judge the actual mISDN changes as you are the
expert there. One thing that is clearly missing is an updated configure.in
to check for the mISDNuser header files and fail when they are not there
and is it really necessary to invoke init_af_isdn()? Where is this coming
from?
I will probably/hopefully merge your:
- LAC
- Card NR
- autorelease
Okay, I managed to do this today. It would be cool if you could split out your
improved log messages (__func__) and extended error checking (making sure we
have 30 bchan's) into a separate patch and I would be happy to merge this
then, afterwards the killing of the usleep should be done.
z.