Lines Matching refs:self

71   void Run(Thread* self) override {  in Run()  argument
72 ScopedObjectAccess soa(self); in Run()
73 StackHandleScope<1u> hs(self); in Run()
76 monitor_test_->thread_ = self; // Pass the Thread. in Run()
77 obj->MonitorEnter(self); // Lock the object. This should transition in Run()
83 obj->MonitorExit(self); // To appease analysis. in Run()
95 obj->MonitorExit(self); // To appease analysis. in Run()
102 ScopedThreadSuspension sts(self, ThreadState::kSuspended); in Run()
103 monitor_test_->barrier_->Wait(self); // Let the other thread know we're done. in Run()
110 Monitor::Wait(self, obj.Get(), millis_, 0, true, ThreadState::kTimedWaiting); in Run()
113 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
115 self->ClearException(); in Run()
120 ScopedThreadSuspension sts(self, ThreadState::kSuspended); in Run()
121 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
124 obj->MonitorExit(self); // Release the object. Appeases analysis. in Run()
145 void Run(Thread* self) override { in Run() argument
146 monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor. in Run()
149 ScopedObjectAccess soa(self); in Run()
155 Monitor::Wait(self, obj, millis_, 0, true, ThreadState::kTimedWaiting); in Run()
158 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
160 self->ClearException(); in Run()
164 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
183 void Run(Thread* self) override { in Run() argument
184 monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor. in Run()
187 ScopedObjectAccess soa(self); in Run()
193 monitor_test_->thread_->Interrupt(self); in Run()
200 Monitor::Wait(self, obj, 10, 0, true, ThreadState::kTimedWaiting); in Run()
203 if (self->IsExceptionPending()) { in Run()
204 self->ClearException(); in Run()
208 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
225 void Run(Thread* self) override { in Run() argument
226 ScopedObjectAccess soa(self); in Run()
227 StackHandleScope<1u> hs(self); in Run()
231 watchdog_obj->MonitorEnter(self); // Lock the object. in Run()
233 watchdog_obj->Wait(self, 30 * 1000, 0); // Wait for 30s, or being woken up. in Run()
235 watchdog_obj->MonitorExit(self); // Release the lock. in Run()
253 Thread* const self = Thread::Current(); in CommonWaitSetup() local
254 ScopedObjectAccess soa(self); in CommonWaitSetup()
258 hs.NewHandle(mirror::String::AllocFromModifiedUtf8(self, "hello, world!")); in CommonWaitSetup()
259 test->object_ = soa.Vm()->AddGlobalRef(self, obj.Get()); in CommonWaitSetup()
262 hs.NewHandle(mirror::String::AllocFromModifiedUtf8(self, "hello, world!")); in CommonWaitSetup()
263 test->watchdog_object_ = soa.Vm()->AddGlobalRef(self, watchdog_obj.Get()); in CommonWaitSetup()
282 thread_pool->AddTask(self, new CreateTask(test, create_sleep, c_millis, c_expected)); in CommonWaitSetup()
284 thread_pool->AddTask(self, new InterruptTask(test, use_sleep, static_cast<uint64_t>(u_millis))); in CommonWaitSetup()
286 thread_pool->AddTask(self, new UseTask(test, use_sleep, u_millis, u_expected)); in CommonWaitSetup()
288 thread_pool->AddTask(self, new WatchdogTask(test)); in CommonWaitSetup()
289 thread_pool->StartWorkers(self); in CommonWaitSetup()
292 test->complete_barrier_->Wait(self); in CommonWaitSetup()
297 ScopedObjectAccess soa2(self); in CommonWaitSetup()
298 watchdog_obj->MonitorEnter(self); // Lock the object. in CommonWaitSetup()
299 watchdog_obj->NotifyAll(self); // Wake up waiting parties. in CommonWaitSetup()
300 watchdog_obj->MonitorExit(self); // Release the lock. in CommonWaitSetup()
303 thread_pool->StopWorkers(self); in CommonWaitSetup()
342 void Run(Thread* self) override { in Run() argument
343 ScopedObjectAccess soa(self); in Run()
344 StackHandleScope<1u> hs(self); in Run()
347 ObjectTryLock<mirror::Object> lock(self, obj); in Run()
363 Thread* const self = Thread::Current(); in TEST_F() local
365 ScopedObjectAccess soa(self); in TEST_F()
366 StackHandleScope<1> hs(self); in TEST_F()
368 hs.NewHandle<mirror::Object>(mirror::String::AllocFromModifiedUtf8(self, "hello, world!"))); in TEST_F()
369 jobject g_obj1 = soa.Vm()->AddGlobalRef(self, obj1.Get()); in TEST_F()
372 ObjectLock<mirror::Object> lock1(self, obj1); in TEST_F()
374 ObjectTryLock<mirror::Object> trylock(self, obj1); in TEST_F()
378 thread_pool->AddTask(self, new TryLockTask(g_obj1)); in TEST_F()
379 thread_pool->StartWorkers(self); in TEST_F()
380 ScopedThreadSuspension sts(self, ThreadState::kSuspended); in TEST_F()
385 ObjectTryLock<mirror::Object> trylock(self, obj1); in TEST_F()
387 obj1->Notify(self); in TEST_F()
389 self->AssertNoPendingException(); in TEST_F()
391 thread_pool->StopWorkers(self); in TEST_F()