aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-12-20 18:13:29 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-02 07:26:05 +0000
commit467f633b165ed2d439bb54d4ae42cdc341ea81b3 (patch)
tree96cd42bf8d5b741a4c68573c554ce9613e762bcf /src/tbf.h
parentb2de1f78888c40acf63cd27385f809c2c5783106 (diff)
TBF: log timer invocation source
When troubleshooting TBF timers we're not only interested in timer duration but also in the code which triggered it. Let's use LOGPSRC to log it: wrap t_start() in a macro for convenience. Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f Related: OS#2407
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 88f5d6a..40ed974 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -169,6 +169,8 @@ enum tbf_timers {
#define GPRS_RLCMAC_FLAG_TO_DL_ASS 7
#define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */
+#define T_START(tbf, t, sec, usec, r, f) tbf->t_start(t, sec, usec, r, f, __FILE__, __LINE__)
+
struct gprs_rlcmac_tbf {
gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir);
@@ -200,7 +202,8 @@ struct gprs_rlcmac_tbf {
void stop_timers(const char *reason);
bool timers_pending(enum tbf_timers t);
void t_stop(enum tbf_timers t, const char *reason);
- void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force);
+ void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force,
+ const char *file, unsigned line);
int establish_dl_tbf_on_pacch();
int check_polling(uint32_t fn, uint8_t ts,