Files
android_kernel_samsung_sm86…/qdf/test/qdf_tracker_test.h
Dustin Brown 9c62f7d939 qcacmn: Add qdf_tracker
A common problem in any C code base is the proper management of various
resources, such as memory allocations, timers, works, locks, etc. To
that end, WLAN has added various one-off leak tracking features for
different resources over the years, to great benefit. However, this
approach is tedious, and prone to copy/paste and fix propagation issues,
making maintaining these various tracking features onerous.

Add a generic leak tracking data structure to WLAN for general use,
which implements these tracking logics. This will allow the various
resource tracking features to leverage this shared implementation for
ease of maintenance. Build on the hash table implementation added as
part of I7f5fc0c59ed220bde43044e7013b3c8573f1bf39.

Change-Id: I3247ace583108139dfb699ca077db3bdf5cfeace
CRs-Fixed: 2422958
2019-04-02 15:16:18 -07:00

38 строки
1.2 KiB
C

/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __QDF_TRACKER_TEST
#define __QDF_TRACKER_TEST
#ifdef WLAN_TRACKER_TEST
/**
* qdf_tracker_unit_test() - run the qdf tracker unit test suite
*
* Return: number of failed test cases
*/
uint32_t qdf_tracker_unit_test(void);
#else
static inline uint32_t qdf_tracker_unit_test(void)
{
return 0;
}
#endif /* WLAN_TRACKER_TEST */
#endif /* __QDF_TRACKER_TEST */