Lines Matching refs:thread
44 TrivialThread thread; in TEST() local
47 ASSERT_FALSE(thread.run_event().IsSignaled()); in TEST()
48 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
50 ASSERT_TRUE(thread.run_event().IsSignaled()); 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].run_event().IsSignaled()); 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].run_event().IsSignaled()); in TEST()
71 TrivialThread thread; in TEST() local
74 ASSERT_FALSE(thread.run_event().IsSignaled()); in TEST()
75 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
77 thread.run_event().Wait(); in TEST()
81 TrivialThread thread[10]; in TEST() local
82 PlatformThreadHandle handle[arraysize(thread)]; in TEST()
84 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
85 ASSERT_FALSE(thread[n].run_event().IsSignaled()); in TEST()
86 for (size_t n = 0; n < arraysize(thread); n++) { in TEST()
87 ASSERT_TRUE(PlatformThread::Create(0, &thread[n], &handle[n])); in TEST()
90 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
91 thread[n].run_event().Wait(); in TEST()
167 FunctionTestThread thread; in TEST() local
170 ASSERT_FALSE(thread.IsRunning()); in TEST()
171 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
172 thread.WaitForTerminationReady(); in TEST()
173 ASSERT_TRUE(thread.IsRunning()); in TEST()
174 EXPECT_NE(thread.thread_id(), main_thread_id); in TEST()
176 thread.MarkForTermination(); in TEST()
178 ASSERT_FALSE(thread.IsRunning()); in TEST()
187 FunctionTestThread thread[10]; in TEST() local
188 PlatformThreadHandle handle[arraysize(thread)]; in TEST()
190 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
191 ASSERT_FALSE(thread[n].IsRunning()); in TEST()
193 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
194 ASSERT_TRUE(PlatformThread::Create(0, &thread[n], &handle[n])); in TEST()
195 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
196 thread[n].WaitForTerminationReady(); in TEST()
198 for (size_t n = 0; n < arraysize(thread); n++) { in TEST()
199 ASSERT_TRUE(thread[n].IsRunning()); in TEST()
200 EXPECT_NE(thread[n].thread_id(), main_thread_id); in TEST()
204 EXPECT_NE(thread[i].thread_id(), thread[n].thread_id()); in TEST()
208 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
209 thread[n].MarkForTermination(); in TEST()
210 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
212 for (size_t n = 0; n < arraysize(thread); n++) in TEST()
213 ASSERT_FALSE(thread[n].IsRunning()); in TEST()
289 ThreadPriorityTestThread thread(kThreadPriorityTestValues[i]); in TEST() local
292 ASSERT_FALSE(thread.IsRunning()); in TEST()
293 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST()
294 thread.WaitForTerminationReady(); in TEST()
295 ASSERT_TRUE(thread.IsRunning()); in TEST()
297 thread.MarkForTermination(); in TEST()
299 ASSERT_FALSE(thread.IsRunning()); in TEST()