diff options
Diffstat (limited to 'runtime/monitor_test.cc')
-rw-r--r-- | runtime/monitor_test.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc index 69112b18ec..83e0c0dea9 100644 --- a/runtime/monitor_test.cc +++ b/runtime/monitor_test.cc @@ -316,7 +316,7 @@ static void CommonWaitSetup(MonitorTest* test, ClassLinker* class_linker, uint64 } // Need to drop the mutator lock to allow barriers. - soa.Self()->TransitionFromRunnableToSuspended(kNative); + ScopedThreadSuspension sts(soa.Self(), kNative); ThreadPool thread_pool(pool_name, 3); thread_pool.AddTask(self, new CreateTask(test, create_sleep, c_millis, c_expected)); if (interrupt) { @@ -340,7 +340,6 @@ static void CommonWaitSetup(MonitorTest* test, ClassLinker* class_linker, uint64 } thread_pool.StopWorkers(self); - soa.Self()->TransitionFromSuspendedToRunnable(); } |