[lchan] Log increase/decrease of channel use count (Andreas Eversberg)

This is part of patch 22 and will log changes in the usecount
of the lchan.
This commit is contained in:
Holger Freyther 2009-06-02 02:55:07 +00:00
parent c21cfbc4aa
commit 4f584c3d4b
1 changed files with 9 additions and 1 deletions

View File

@ -40,10 +40,18 @@ typedef int gsm_cbfn(unsigned int hooknum,
#define LCHAN_RELEASE_TIMEOUT 4, 0
#define use_lchan(lchan) \
do { lchan->use_count++; \
DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) increases usage to: %d\n", \
lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
lchan->nr, lchan->use_count); \
bsc_schedule_timer(&lchan->release_timer, LCHAN_RELEASE_TIMEOUT); } while(0);
#define put_lchan(lchan) \
do { lchan->use_count--; } while(0);
do { lchan->use_count--; \
DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) decreases usage to: %d\n", \
lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
lchan->nr, lchan->use_count); \
} while(0);
/* communications link with a BTS */
struct gsm_bts_link {