Files
android_kernel_samsung_sm86…/qdf/test/qdf_slist_test.h
Dustin Brown b52a362e62 qcacmn: Add qdf_slist
For memory savings it is sometimes desirable to use a single-linked list
instead of a double-linked list. However, the Linux kernel does not
provide a default implementation of a single-linked list.

Add a very simple single-linked list implementation to WLAN for general
use.

Change-Id: I2959f34649a0d8e0b312d9d67c81de17753b9b6c
CRs-Fixed: 2418493
2019-03-26 02:51:09 -07:00

38 lines
1.1 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_SLIST_TEST_H
#define __QDF_SLIST_TEST_H
#ifdef WLAN_SLIST_TEST
/**
* qdf_slist_unit_test() - run the qdf slist unit test suite
*
* Return: number of failed test cases
*/
uint32_t qdf_slist_unit_test(void);
#else
static inline uint32_t qdf_slist_unit_test(void)
{
return 0;
}
#endif /* WLAN_SLIST_TEST */
#endif /* __QDF_SLIST_TEST_H */