8 #include <sys/syscall.h>
13 #ifdef __NR_membarrier
14 if (syscall(__NR_membarrier, 3, 255) != -1)
16 printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s\n",
18 "ENOSYS (Function not implemented)" :
19 "EINVAL (Invalid argument)");
20 if (errno != ENOSYS) {
21 if (syscall(__NR_membarrier, 0, 0) != 1)
22 return 1; /* the test needs to be updated? */
23 puts("membarrier(MEMBARRIER_CMD_QUERY, 0)"
24 " = 0x1 (MEMBARRIER_CMD_SHARED)");
26 puts("+++ exited with 0 +++");