Lines Matching refs:self

66   void Run(Thread* self) override {  in Run()  argument
68 ScopedObjectAccess soa(self); in Run()
70 monitor_test_->thread_ = self; // Pass the Thread. in Run()
71 monitor_test_->object_.Get()->MonitorEnter(self); // Lock the object. This should transition in Run()
77 monitor_test_->object_.Get()->MonitorExit(self); // To appease analysis. in Run()
89 monitor_test_->object_.Get()->MonitorExit(self); // To appease analysis. in Run()
95 monitor_test_->barrier_->Wait(self); // Let the other thread know we're done. in Run()
98 ScopedObjectAccess soa(self); in Run()
104 Monitor::Wait(self, monitor_test_->object_.Get(), millis_, 0, true, in Run()
108 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
110 self->ClearException(); in Run()
114 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
117 ScopedObjectAccess soa(self); in Run()
118 monitor_test_->object_.Get()->MonitorExit(self); // Release the object. Appeases analysis. in Run()
140 void Run(Thread* self) override { in Run() argument
141 monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor. in Run()
144 ScopedObjectAccess soa(self); in Run()
149 Monitor::Wait(self, monitor_test_->object_.Get(), millis_, 0, true, in Run()
153 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
155 self->ClearException(); in Run()
159 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
178 void Run(Thread* self) override { in Run() argument
179 monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor. in Run()
182 ScopedObjectAccess soa(self); in Run()
188 monitor_test_->thread_->Interrupt(self); in Run()
194 Monitor::Wait(self, monitor_test_->object_.Get(), 10, 0, true, in Run()
198 if (self->IsExceptionPending()) { in Run()
199 self->ClearException(); in Run()
203 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
220 void Run(Thread* self) override { in Run() argument
221 ScopedObjectAccess soa(self); in Run()
223 monitor_test_->watchdog_object_.Get()->MonitorEnter(self); // Lock the object. in Run()
225 monitor_test_->watchdog_object_.Get()->Wait(self, 30 * 1000, 0); // Wait for 30s, or being in Run()
228 monitor_test_->watchdog_object_.Get()->MonitorExit(self); // Release the lock. in Run()
246 Thread* const self = Thread::Current(); in CommonWaitSetup() local
247 ScopedObjectAccess soa(self); in CommonWaitSetup()
250 test->object_ = hs.NewHandle(mirror::String::AllocFromModifiedUtf8(self, "hello, world!")); in CommonWaitSetup()
251 test->watchdog_object_ = hs.NewHandle(mirror::String::AllocFromModifiedUtf8(self, in CommonWaitSetup()
270 thread_pool.AddTask(self, new CreateTask(test, create_sleep, c_millis, c_expected)); in CommonWaitSetup()
272 thread_pool.AddTask(self, new InterruptTask(test, use_sleep, static_cast<uint64_t>(u_millis))); in CommonWaitSetup()
274 thread_pool.AddTask(self, new UseTask(test, use_sleep, u_millis, u_expected)); in CommonWaitSetup()
276 thread_pool.AddTask(self, new WatchdogTask(test)); in CommonWaitSetup()
277 thread_pool.StartWorkers(self); in CommonWaitSetup()
280 test->complete_barrier_->Wait(self); in CommonWaitSetup()
285 ScopedObjectAccess soa2(self); in CommonWaitSetup()
286 test->watchdog_object_.Get()->MonitorEnter(self); // Lock the object. in CommonWaitSetup()
287 test->watchdog_object_.Get()->NotifyAll(self); // Wake up waiting parties. in CommonWaitSetup()
288 test->watchdog_object_.Get()->MonitorExit(self); // Release the lock. in CommonWaitSetup()
291 thread_pool.StopWorkers(self); in CommonWaitSetup()
330 void Run(Thread* self) override { in Run() argument
331 ScopedObjectAccess soa(self); in Run()
333 ObjectTryLock<mirror::Object> lock(self, obj_); in Run()
349 Thread* const self = Thread::Current(); in TEST_F() local
351 ScopedObjectAccess soa(self); in TEST_F()
352 StackHandleScope<1> hs(self); in TEST_F()
354 hs.NewHandle<mirror::Object>(mirror::String::AllocFromModifiedUtf8(self, "hello, world!"))); in TEST_F()
356 ObjectLock<mirror::Object> lock1(self, obj1); in TEST_F()
358 ObjectTryLock<mirror::Object> trylock(self, obj1); in TEST_F()
362 thread_pool.AddTask(self, new TryLockTask(obj1)); in TEST_F()
363 thread_pool.StartWorkers(self); in TEST_F()
364 ScopedThreadSuspension sts(self, kSuspended); in TEST_F()
369 ObjectTryLock<mirror::Object> trylock(self, obj1); in TEST_F()
371 obj1->Notify(self); in TEST_F()
373 self->AssertNoPendingException(); in TEST_F()
375 thread_pool.StopWorkers(self); in TEST_F()