summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/membarrier/membarrier_test_single_thread.c
blob: fa3f1d6c37a0f14fed2bed4455ca9a4351c5deae (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
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <linux/membarrier.h>
#include <syscall.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <pthread.h>

#include "membarrier_test_impl.h"

int main(int argc, char **argv)
{
	ksft_print_header();
	ksft_set_plan(18);

	test_membarrier_get_registrations(/*cmd=*/0);

	test_membarrier_query();

	test_membarrier_fail();

	test_membarrier_success();

	test_membarrier_get_registrations(/*cmd=*/0);

	ksft_exit_pass();
}