Linux Audio

Check our new training course

Loading...
v6.2
 1// SPDX-License-Identifier: GPL-2.0+
 2/*
 3 * xarray.c: Userspace shim for XArray test-suite
 4 * Copyright (c) 2018 Matthew Wilcox <willy@infradead.org>
 5 */
 6
 7#define XA_DEBUG
 8#include "test.h"
 9
10#define module_init(x)
11#define module_exit(x)
12#define MODULE_AUTHOR(x)
13#define MODULE_LICENSE(x)
14#define dump_stack()	assert(0)
15
16#include "../../../lib/xarray.c"
17#undef XA_DEBUG
18#include "../../../lib/test_xarray.c"
19
20void xarray_tests(void)
21{
22	xarray_checks();
23	xarray_exit();
24}
25
26int __weak main(void)
27{
28	rcu_register_thread();
29	radix_tree_init();
30	xarray_tests();
31	radix_tree_cpu_dead(1);
32	rcu_barrier();
33	if (nr_allocated)
34		printf("nr_allocated = %d\n", nr_allocated);
35	rcu_unregister_thread();
36	return 0;
37}
v6.13.7
 1// SPDX-License-Identifier: GPL-2.0+
 2/*
 3 * xarray.c: Userspace shim for XArray test-suite
 4 * Copyright (c) 2018 Matthew Wilcox <willy@infradead.org>
 5 */
 6
 7#include "xarray-shared.h"
 8#include "test.h"
 9
 
 
 
 
 
 
 
10#undef XA_DEBUG
11#include "../../../lib/test_xarray.c"
12
13void xarray_tests(void)
14{
15	xarray_checks();
16	xarray_exit();
17}
18
19int __weak main(void)
20{
21	rcu_register_thread();
22	radix_tree_init();
23	xarray_tests();
24	radix_tree_cpu_dead(1);
25	rcu_barrier();
26	if (nr_allocated)
27		printf("nr_allocated = %d\n", nr_allocated);
28	rcu_unregister_thread();
29	return 0;
30}