Added function names to timer debug output
This commit is contained in:
@@ -42,6 +42,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef LWIP_DEBUG_TIMERNAMES
|
||||
#define LWIP_DEBUG_TIMERNAMES (LWIP_DEBUG && SYS_DEBUG)
|
||||
#endif
|
||||
|
||||
typedef void (* sys_timeout_handler)(void *arg);
|
||||
|
||||
struct sys_timeo {
|
||||
@@ -49,10 +53,20 @@ struct sys_timeo {
|
||||
u32_t time;
|
||||
sys_timeout_handler h;
|
||||
void *arg;
|
||||
#if LWIP_DEBUG_TIMERNAMES
|
||||
const char* handler_name;
|
||||
#endif /* LWIP_DEBUG_TIMERNAMES */
|
||||
};
|
||||
|
||||
void sys_timeouts_init(void);
|
||||
|
||||
#if LWIP_DEBUG_TIMERNAMES
|
||||
void sys_timeout_debug(u32_t msecs, sys_timeout_handler h, void *arg, const char* handler_name);
|
||||
#define sys_timeout(msecs, handler, arg) sys_timeout_debug(msecs, handler, arg, #handler)
|
||||
#else /* LWIP_DEBUG_TIMERNAMES */
|
||||
void sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
|
||||
#endif /* LWIP_DEBUG_TIMERNAMES */
|
||||
|
||||
void sys_untimeout(sys_timeout_handler h, void *arg);
|
||||
#if NO_SYS
|
||||
void sys_check_timeouts(void);
|
||||
|
||||
Reference in New Issue
Block a user