Lines Matching refs:flags
11 static int sys_membarrier(int cmd, int flags) in sys_membarrier() argument
13 return syscall(__NR_membarrier, cmd, flags); in sys_membarrier()
18 int cmd = -1, flags = 0; in test_membarrier_cmd_fail() local
21 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_cmd_fail()
24 test_name, cmd, flags); in test_membarrier_cmd_fail()
29 test_name, flags, EINVAL, strerror(EINVAL), in test_membarrier_cmd_fail()
35 test_name, cmd, flags, errno); in test_membarrier_cmd_fail()
41 int cmd = MEMBARRIER_CMD_QUERY, flags = 1; in test_membarrier_flags_fail() local
44 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_flags_fail()
47 test_name, flags); in test_membarrier_flags_fail()
52 test_name, flags, EINVAL, strerror(EINVAL), in test_membarrier_flags_fail()
58 test_name, flags, errno); in test_membarrier_flags_fail()
64 int cmd = MEMBARRIER_CMD_GLOBAL, flags = 0; in test_membarrier_global_success() local
67 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_global_success()
70 test_name, flags, errno); in test_membarrier_global_success()
74 "%s test: flags = %d\n", test_name, flags); in test_membarrier_global_success()
80 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_private_expedited_fail() local
83 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_private_expedited_fail()
86 test_name, flags); in test_membarrier_private_expedited_fail()
91 test_name, flags, EPERM, strerror(EPERM), in test_membarrier_private_expedited_fail()
97 test_name, flags, errno); in test_membarrier_private_expedited_fail()
103 int cmd = MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_register_private_expedited_success() local
106 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_private_expedited_success()
109 test_name, flags, errno); in test_membarrier_register_private_expedited_success()
114 test_name, flags); in test_membarrier_register_private_expedited_success()
120 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_private_expedited_success() local
123 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_private_expedited_success()
126 test_name, flags, errno); in test_membarrier_private_expedited_success()
131 test_name, flags); in test_membarrier_private_expedited_success()
137 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE, flags = 0; in test_membarrier_private_expedited_sync_core_fail() local
140 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_private_expedited_sync_core_fail()
143 test_name, flags); in test_membarrier_private_expedited_sync_core_fail()
148 test_name, flags, EPERM, strerror(EPERM), in test_membarrier_private_expedited_sync_core_fail()
154 test_name, flags, errno); in test_membarrier_private_expedited_sync_core_fail()
160 int cmd = MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE, flags = 0; in test_membarrier_register_private_expedited_sync_core_success() local
163 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_private_expedited_sync_core_success()
166 test_name, flags, errno); in test_membarrier_register_private_expedited_sync_core_success()
171 test_name, flags); in test_membarrier_register_private_expedited_sync_core_success()
177 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_private_expedited_sync_core_success() local
180 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_private_expedited_sync_core_success()
183 test_name, flags, errno); in test_membarrier_private_expedited_sync_core_success()
188 test_name, flags); in test_membarrier_private_expedited_sync_core_success()
194 int cmd = MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED, flags = 0; in test_membarrier_register_global_expedited_success() local
197 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_global_expedited_success()
200 test_name, flags, errno); in test_membarrier_register_global_expedited_success()
205 test_name, flags); in test_membarrier_register_global_expedited_success()
211 int cmd = MEMBARRIER_CMD_GLOBAL_EXPEDITED, flags = 0; in test_membarrier_global_expedited_success() local
214 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_global_expedited_success()
217 test_name, flags, errno); in test_membarrier_global_expedited_success()
222 test_name, flags); in test_membarrier_global_expedited_success()
282 int flags = 0, ret; in test_membarrier_query() local
284 ret = sys_membarrier(MEMBARRIER_CMD_QUERY, flags); in test_membarrier_query()