Lines Matching defs:arg
119 static bool start_thread(zxr_thread_entry_t entry, void* arg,
142 ASSERT_EQ(zxr_thread_start(thread_out, stack, stack_size, entry, arg),
147 static bool start_and_kill_thread(zxr_thread_entry_t entry, void* arg) {
150 ASSERT_TRUE(start_thread(entry, arg, &thread, &thread_h));
371 __NO_SAFESTACK static void self_killing_fn(void* arg) {
372 self_killing_thread_args* args = static_cast<self_killing_thread_args*>(arg);
631 test_writing_thread_arg* arg = static_cast<test_writing_thread_arg*>(arg_);
633 arg->v = 1;
643 test_writing_thread_arg arg = {.v = 0};
645 ASSERT_TRUE(start_thread(test_writing_thread_fn, &arg, &thread, &thread_h));
647 while (arg.v != 1) {
653 while (arg.v != 2) {
654 arg.v = 2;
659 while (arg.v != 1) {
757 test_writing_thread_arg arg = {.v = 0};
759 ASSERT_TRUE(start_thread(test_writing_thread_fn, &arg, &thread, &thread_h));
761 // Wait until the thread has started and has modified arg.v.
762 while (arg.v != 1) {
774 arg.v = 100;
781 // so should not have modified arg.v.
782 EXPECT_EQ(arg.v, 100);
1294 test_writing_thread_arg arg = {.v = 0};
1297 ASSERT_TRUE(start_thread(test_writing_thread_fn, &arg, &thread,
1300 while (arg.v != 1) {
1334 arg.v = 0;
1337 while (arg.v != 1) {