qcacmn: Add qdf_mc_timer_check_for_leaks API

Add a new  QDF MC Timer API for asserting that there are no active MC
Timers allocated. This is useful for detecting MC Timer leaks at
runtime.

Change-Id: I272ce806111b01b5c7f6b0dfef2e992c27b83529
CRs-Fixed: 2125800
This commit is contained in:
Dustin Brown
2017-12-06 16:18:53 -08:00
committed by snandini
부모 c5ac638d51
커밋 f7fb76bd5e
2개의 변경된 파일110개의 추가작업 그리고 32개의 파일을 삭제

파일 보기

@@ -66,7 +66,7 @@ struct qdf_mc_timer_s;
typedef struct qdf_mc_timer_node_s {
qdf_list_node_t node;
char *file_name;
unsigned int line_num;
uint32_t line_num;
struct qdf_mc_timer_s *qdf_timer;
} qdf_mc_timer_node_t;
#endif
@@ -90,6 +90,7 @@ void qdf_try_allowing_sleep(QDF_TIMER_TYPE type);
#ifdef TIMER_MANAGER
void qdf_mc_timer_manager_init(void);
void qdf_mc_timer_manager_exit(void);
void qdf_mc_timer_check_for_leaks(void);
#else
/**
* qdf_mc_timer_manager_init() - initialize QDF debug timer manager
@@ -110,6 +111,15 @@ static inline void qdf_mc_timer_manager_init(void)
static inline void qdf_mc_timer_manager_exit(void)
{
}
/**
* qdf_mc_timer_check_for_leaks() - Assert there are no active mc timers
*
* If there are active timers, this API prints them and panics.
*
* Return: None
*/
static inline void qdf_mc_timer_check_for_leaks(void) { }
#endif
/**
* qdf_mc_timer_get_current_state() - get the current state of the timer