Lines Matching refs:arg
82 static void PtyReader_28979140(PtyReader_28979140_Arg* arg) { in PtyReader_28979140() argument
83 arg->finished = false; in PtyReader_28979140()
86 CPU_CLR(arg->main_cpu_id, &cpus); in PtyReader_28979140()
90 while (counter <= arg->data_count) { in PtyReader_28979140()
92 size_t to_read = std::min(sizeof(buf), (arg->data_count + 1 - counter) * sizeof(uint32_t)); in PtyReader_28979140()
93 ASSERT_TRUE(android::base::ReadFully(arg->slave_fd, buf, to_read)); in PtyReader_28979140()
98 arg->matched = false; in PtyReader_28979140()
102 close(arg->slave_fd); in PtyReader_28979140()
103 arg->finished = true; in PtyReader_28979140()
127 PtyReader_28979140_Arg arg; in TEST() local
128 arg.main_cpu_id = -1; in TEST()
131 arg.main_cpu_id = i; in TEST()
135 ASSERT_GE(arg.main_cpu_id, 0); in TEST()
139 arg.slave_fd = slave; in TEST()
140 arg.data_count = TEST_DATA_COUNT; in TEST()
141 arg.matched = true; in TEST()
144 &arg)); in TEST()
147 CPU_SET(arg.main_cpu_id, &cpus); in TEST()
160 ASSERT_TRUE(arg.matched) << "failed at count = " << counter; in TEST()
163 ASSERT_TRUE(arg.finished); in TEST()
164 ASSERT_TRUE(arg.matched); in TEST()