This also uncovers very interesting design decisions like the copying of
mutexes and condition vars depending on recursive locks that were
previously hidden by shady c function calls..
We have perfectly good c++11 versions for all of that.
While we're at it, also use the initialization list for the other (still
copy constructable) vectors, which cleans up the radio interfaces.
Change-Id: Idc9e3b1144c5b93f5dad2f8e0e30f1058477aa52
Otherwise, it could happen that underrun events are lost:
TxLower (isUnderrun): RxLower (pullBuffer):
read(underrun)
read(underrun)
write(underrun, |val) [maybe underrun becomes TRUE]
write(underrun, false)
Similary, it could happen the other direction if atomic was only applied
to isUnderrun:
TxLower (isUnderrun): RxLower (pullBuffer):
read(underrun) -> true
read(underrun)-> true
write(underrun, false)
write(underrun, true|val) where val=false
So in here isUnderrun would return true twice while it should only
return one.
Change-Id: I684e0a5d2a9583a161d5a6593559b3a9e7cd57e3
osmo-trx can start a considerable amount of threads that can make
debugging it challenging at least. By using phtread_setname_np, the
system sets a meaningful name to the thread which can be seen while
debugging with gdb or by printing /proc/$pid/task/$tid/comm.
Now we also log system TID when setting the name so we can identify
different tasks in /proc even if pthread_setname_np fails.
Change-Id: I84711739c3e224cb383fd12b6db933785b28209e
For clean shutdown in the transceiver we need to cancel and join
running threads for orderly unwinding. Thread cancellation points
already exist, so we just need to be able to call on the threads to
exit out when stopping or shutting down.
Don't error when joining a NULL thread, which would be the case if a
thread was stopped before ever being started to begin with.
Signed-off-by: Tom Tsou <tom@tsou.cc>
r4232: Major change in hos entries are removed from a TransactionTable.
>From now on, the only place were entries are actually removed is in TransactionTable::innerRemove.
Anywhere else, the remove methods just set a flag to tag the entry for later removal be innerRemove.
This allows us to survive situations where we try to touch transactions that have been removed already. We still log at the ERR level, but no more segfaults.
Updated all of the TransactionTable "find" methods to not return pointers to dead or removed tranactions.
Updated find-by-channel search to return the transaction entry with the highest transaction number, which fixes a bug that sometimes picked up the wrong transaction records during EA TCH assignment.
r4253: New exception class for when someone tries to use a "removed" transaction.
r4254: Updated copyright notice.
r4265: Unlock TransactionEntry::mLock while blocked on SIP message FIFOs in SIPEngine. This does wonders to reduce lock contention and make everything more snappy.
Use Mutex::tryLock in TransactionEntry::dead and if lock is held, assume that it is not dead. This also does a lot to reduce lock contention.
r4294: Change Um congestion response back to SIP 503.
r4295: When deleting an entry that has failed to respond to paging, send a SIP 480 response so the switch knows that transaction is dead.
r4412: Fixed bug that was causing SIPInterface to crash when the IMSI cannot be extracted from the To: header.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4497 19bc5d8c-e614-43d4-8b26-e1612bc8e597