mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
![Michal Clapinski](/assets/img/avatar_default.png)
Keep track of previously issued registrations and compare the result with MEMBARRIER_CMD_GET_REGISTRATIONS return value. Signed-off-by: Michal Clapinski <mclapinski@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: Paul E. McKenney <paulmck@kernel.org> Link: https://lore.kernel.org/r/20221207164338.1535591-3-mclapinski@google.com
28 lines
505 B
C
28 lines
505 B
C
// 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);
|
|
|
|
return ksft_exit_pass();
|
|
}
|