From 467f633b165ed2d439bb54d4ae42cdc341ea81b3 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 20 Dec 2017 18:13:29 +0100 Subject: 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 --- src/tbf.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/tbf.h') diff --git a/src/tbf.h b/src/tbf.h index 88f5d6a1..40ed9742 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, -- cgit v1.2.3