File: test_arch.c

package info (click to toggle)
liburcu 0.15.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,356 kB
  • sloc: ansic: 23,370; xml: 23,227; sh: 6,480; makefile: 1,045; cpp: 15
file content (34 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (2)
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
33
34
// SPDX-FileCopyrightText: 2021 Michael Jeanson <mjeanson@efficios.com>
//
// SPDX-License-Identifier: GPL-2.0-or-later

#include <stdio.h>
#include <urcu/arch.h>

#include "tap.h"

#define NR_TESTS 1


/*
 * This is only to make sure the static inline caa_get_cycles() in the public
 * headers builds properly.
 */
static
void test_caa_get_cycles(void) {
	caa_cycles_t cycles = 0;


	cycles = caa_get_cycles();

	ok(cycles != 0, "caa_get_cycles works");
}

int main(void)
{
	plan_tests(NR_TESTS);

	test_caa_get_cycles();

	return exit_status();
}