aboutsummaryrefslogtreecommitdiffstats
path: root/test/test/test_prefetch.c
blob: 41f219af7834d3b7e84a1b65db2d9d1d93f7c738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2010-2014 Intel Corporation
 */

#include <stdio.h>
#include <stdint.h>

#include <rte_prefetch.h>

#include "test.h"

/*
 * Prefetch test
 * =============
 *
 * - Just test that the macro can be called and validate the compilation.
 *   The test always return success.
 */

static int
test_prefetch(void)
{
	int a;

	rte_prefetch0(&a);
	rte_prefetch1(&a);
	rte_prefetch2(&a);

	return 0;
}

REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);