Lines Matching refs:thread

44   TrivialThread thread;  in TEST()  local
47 ASSERT_FALSE(thread.did_run()); in TEST()
48 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
50 ASSERT_TRUE(thread.did_run()); in TEST()
54 TrivialThread thread[10]; in TEST() local
55 PlatformThreadHandle handle[arraysize(thread)]; in TEST()
57 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
58 ASSERT_FALSE(thread[n].did_run()); in TEST()
59 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
60 ASSERT_TRUE(PlatformThread::Create(0, &thread[n], &handle[n])); in TEST()
61 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
63 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
64 ASSERT_TRUE(thread[n].did_run()); in TEST()
138 FunctionTestThread thread; in TEST() local
141 ASSERT_FALSE(thread.IsRunning()); in TEST()
142 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
143 thread.WaitForTerminationReady(); in TEST()
144 ASSERT_TRUE(thread.IsRunning()); in TEST()
145 EXPECT_NE(thread.thread_id(), main_thread_id); in TEST()
147 thread.MarkForTermination(); in TEST()
149 ASSERT_FALSE(thread.IsRunning()); in TEST()
158 FunctionTestThread thread[10]; in TEST() local
159 PlatformThreadHandle handle[arraysize(thread)]; in TEST()
161 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
162 ASSERT_FALSE(thread[n].IsRunning()); in TEST()
164 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
165 ASSERT_TRUE(PlatformThread::Create(0, &thread[n], &handle[n])); in TEST()
166 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
167 thread[n].WaitForTerminationReady(); in TEST()
169 for (size_t n = 0; n < arraysize(thread); n++) { in TEST()
170 ASSERT_TRUE(thread[n].IsRunning()); in TEST()
171 EXPECT_NE(thread[n].thread_id(), main_thread_id); in TEST()
175 EXPECT_NE(thread[i].thread_id(), thread[n].thread_id()); in TEST()
179 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
180 thread[n].MarkForTermination(); in TEST()
181 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
183 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
184 ASSERT_FALSE(thread[n].IsRunning()); in TEST()
262 ThreadPriorityTestThread thread; in TEST() local
265 ASSERT_FALSE(thread.IsRunning()); in TEST()
266 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
267 thread.WaitForTerminationReady(); in TEST()
268 ASSERT_TRUE(thread.IsRunning()); in TEST()
270 thread.MarkForTermination(); in TEST()
272 ASSERT_FALSE(thread.IsRunning()); in TEST()