Home
last modified time | relevance | path

Searched refs:ThreadType (Results 1 – 25 of 55) sorted by relevance

123

/external/cronet/base/threading/
Dplatform_thread_unittest.cc247 constexpr ThreadType kAllThreadTypes[] = {
248 ThreadType::kRealtimeAudio, ThreadType::kDisplayCritical,
249 ThreadType::kCompositing, ThreadType::kDefault,
250 ThreadType::kResourceEfficient, ThreadType::kUtility,
251 ThreadType::kBackground};
255 explicit ThreadTypeTestThread(ThreadType from, ThreadType to) in ThreadTypeTestThread()
265 EXPECT_EQ(PlatformThread::GetCurrentThreadType(), ThreadType::kDefault); in RunTest()
272 const ThreadType from_;
273 const ThreadType to_;
278 ThreadPriorityTestThread(ThreadType thread_type, in ThreadPriorityTestThread()
[all …]
Dplatform_thread_fuchsia.cc96 bool PlatformThread::CanChangeThreadType(ThreadType from, ThreadType to) { in CanChangeThreadType()
97 return from == to || to == ThreadType::kDisplayCritical || in CanChangeThreadType()
98 to == ThreadType::kRealtimeAudio; in CanChangeThreadType()
103 void SetCurrentThreadTypeImpl(ThreadType thread_type, in SetCurrentThreadTypeImpl()
106 case ThreadType::kDefault: in SetCurrentThreadTypeImpl()
111 case ThreadType::kBackground: in SetCurrentThreadTypeImpl()
115 case ThreadType::kUtility: in SetCurrentThreadTypeImpl()
119 case ThreadType::kResourceEfficient: in SetCurrentThreadTypeImpl()
123 case ThreadType::kCompositing: in SetCurrentThreadTypeImpl()
128 case ThreadType::kDisplayCritical: in SetCurrentThreadTypeImpl()
[all …]
Dscoped_thread_priority_unittest.cc25 static ThreadType kAllThreadTypes[] = {
26 ThreadType::kRealtimeAudio, ThreadType::kDisplayCritical,
27 ThreadType::kCompositing, ThreadType::kDefault, ThreadType::kBackground};
29 static_assert(static_cast<int>(ThreadType::kBackground) == 0,
31 static_assert(ThreadType::kRealtimeAudio == ThreadType::kMaxValue,
63 if (!PlatformThread::CanChangeThreadType(ThreadType::kDefault, from)) in TEST_F()
68 if (to == ThreadType::kRealtimeAudio) in TEST_F()
76 [](ThreadType from, ThreadType to) { in TEST_F()
113 PlatformThread::SetCurrentThreadType(ThreadType::kBackground); in TEST_F()
123 PlatformThread::SetCurrentThreadType(ThreadType::kDefault); in TEST_F()
[all …]
Dplatform_thread_linux.cc147 ThreadType thread_type) { in ThreadTypeToCgroupDirectory()
149 case ThreadType::kBackground: in ThreadTypeToCgroupDirectory()
150 case ThreadType::kUtility: in ThreadTypeToCgroupDirectory()
151 case ThreadType::kResourceEfficient: in ThreadTypeToCgroupDirectory()
153 case ThreadType::kDefault: in ThreadTypeToCgroupDirectory()
155 case ThreadType::kCompositing: in ThreadTypeToCgroupDirectory()
164 case ThreadType::kDisplayCritical: in ThreadTypeToCgroupDirectory()
165 case ThreadType::kRealtimeAudio: in ThreadTypeToCgroupDirectory()
186 ThreadType thread_type) { in SetThreadCgroupForThreadType()
203 ThreadType thread_type) { in SetThreadLatencySensitivity()
[all …]
Dplatform_thread_win.cc94 ThreadType thread_type;
104 if (thread_params->thread_type != ThreadType::kDefault) in ThreadFunc()
149 PlatformThread::SetCurrentThreadType(ThreadType::kDefault); in ThreadFunc()
160 ThreadType thread_type, in CreateThreadInternal()
316 ThreadType thread_type, in CreateWithType()
325 return CreateNonJoinableWithType(stack_size, delegate, ThreadType::kDefault); in CreateNonJoinable()
331 ThreadType thread_type, in CreateNonJoinableWithType()
367 bool PlatformThread::CanChangeThreadType(ThreadType from, ThreadType to) { in CanChangeThreadType()
373 void SetCurrentThreadPriority(ThreadType thread_type, in SetCurrentThreadPriority()
375 if (thread_type == ThreadType::kCompositing && in SetCurrentThreadPriority()
[all …]
Dplatform_thread_android.cc47 {ThreadType::kBackground, 10}, {ThreadType::kUtility, 1},
48 {ThreadType::kResourceEfficient, 0}, {ThreadType::kDefault, 0},
49 {ThreadType::kCompositing, -4}, {ThreadType::kDisplayCritical, -4},
50 {ThreadType::kRealtimeAudio, -16},
57 bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, in SetCurrentThreadTypeForPlatform()
61 if (thread_type == ThreadType::kRealtimeAudio) { in SetCurrentThreadTypeForPlatform()
68 if (thread_type == ThreadType::kCompositing && in SetCurrentThreadTypeForPlatform()
71 ThreadTypeToNiceValue(ThreadType::kCompositing)) { in SetCurrentThreadTypeForPlatform()
Dplatform_thread.h97 enum class ThreadType : int { enum
212 ThreadType::kDefault); in Create()
224 ThreadType thread_type,
239 ThreadType thread_type,
253 static bool CanChangeThreadType(ThreadType from, ThreadType to);
258 static void SetCurrentThreadType(ThreadType thread_type);
262 static ThreadType GetCurrentThreadType();
286 ThreadType thread_type);
311 void SetCurrentThreadType(ThreadType thread_type,
314 void SetCurrentThreadTypeImpl(ThreadType thread_type,
Dplatform_thread.cc18 ABSL_CONST_INIT thread_local ThreadType current_thread_type =
19 ThreadType::kDefault;
24 void PlatformThread::SetCurrentThreadType(ThreadType thread_type) { in SetCurrentThreadType()
38 ThreadType PlatformThread::GetCurrentThreadType() { in GetCurrentThreadType()
49 if (GetCurrentThreadType() == ThreadType::kRealtimeAudio) in GetThreadLeewayOverride()
57 void SetCurrentThreadType(ThreadType thread_type, in SetCurrentThreadType()
59 CHECK_LE(thread_type, ThreadType::kMaxValue); in SetCurrentThreadType()
Dscoped_thread_priority.cc14 ScopedBoostPriority::ScopedBoostPriority(ThreadType target_thread_type) { in ScopedBoostPriority()
15 DCHECK_LT(target_thread_type, ThreadType::kRealtimeAudio); in ScopedBoostPriority()
16 const ThreadType original_thread_type = in ScopedBoostPriority()
54 const base::ThreadType thread_type = PlatformThread::GetCurrentThreadType(); in ScopedMayLoadLibraryAtBackgroundPriority()
55 if (thread_type == base::ThreadType::kBackground) { in ScopedMayLoadLibraryAtBackgroundPriority()
57 PlatformThread::SetCurrentThreadType(base::ThreadType::kDefault); in ScopedMayLoadLibraryAtBackgroundPriority()
Dplatform_thread_posix.cc64 ThreadType thread_type = ThreadType::kDefault;
119 ThreadType thread_type, in CreateThread()
312 ThreadType thread_type, in CreateWithType()
320 return CreateNonJoinableWithType(stack_size, delegate, ThreadType::kDefault); in CreateNonJoinable()
326 ThreadType thread_type, in CreateNonJoinableWithType()
355 bool PlatformThread::CanChangeThreadType(ThreadType from, ThreadType to) { in CanChangeThreadType()
363 if (to == ThreadType::kRealtimeAudio) { in CanChangeThreadType()
373 void SetCurrentThreadTypeImpl(ThreadType thread_type, in SetCurrentThreadTypeImpl()
Dscoped_thread_priority.h20 enum class ThreadType : int;
70 explicit ScopedBoostPriority(ThreadType target_thread_type);
77 absl::optional<ThreadType> original_thread_type_;
100 absl::optional<ThreadType> original_thread_type_;
Dhang_watcher.cc64 void LogHungThreadCountHistogram(HangWatcher::ThreadType thread_type, in LogHungThreadCountHistogram()
78 case HangWatcher::ThreadType::kIOThread: in LogHungThreadCountHistogram()
84 case HangWatcher::ThreadType::kMainThread: in LogHungThreadCountHistogram()
90 case HangWatcher::ThreadType::kThreadPoolThread: in LogHungThreadCountHistogram()
102 case HangWatcher::ThreadType::kIOThread: in LogHungThreadCountHistogram()
108 case HangWatcher::ThreadType::kMainThread: in LogHungThreadCountHistogram()
114 case HangWatcher::ThreadType::kThreadPoolThread: in LogHungThreadCountHistogram()
122 case HangWatcher::ThreadType::kIOThread: in LogHungThreadCountHistogram()
128 case HangWatcher::ThreadType::kMainThread: in LogHungThreadCountHistogram()
134 case HangWatcher::ThreadType::kThreadPoolThread: in LogHungThreadCountHistogram()
[all …]
Dplatform_thread_internal_posix.h18 ThreadType thread_type;
40 int ThreadTypeToNiceValue(ThreadType thread_type);
50 bool SetCurrentThreadTypeForPlatform(ThreadType thread_type,
Dhang_watcher.h125 enum class ThreadType { enum
204 ThreadType thread_type);
257 ThreadType thread_type) LOCKS_EXCLUDED(watch_state_lock_);
570 explicit HangWatchState(HangWatcher::ThreadType thread_type);
579 HangWatcher::ThreadType thread_type);
645 HangWatcher::ThreadType thread_type() const { return thread_type_; } in thread_type()
666 const HangWatcher::ThreadType thread_type_;
Dhang_watcher_unittest.cc76 base::HangWatcher::ThreadType::kMainThread); in Run()
217 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
236 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
258 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
298 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
326 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
352 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
383 HangWatcher::ThreadType::kMainThread); in TEST_F()
616 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
672 HangWatcher::RegisterThread(base::HangWatcher::ThreadType::kMainThread); in TEST_F()
[all …]
Dplatform_thread_mac.mm289 bool PlatformThread::CanChangeThreadType(ThreadType from, ThreadType to) {
295 void SetCurrentThreadTypeImpl(ThreadType thread_type,
302 thread_type >= ThreadType::kCompositing) {
303 DCHECK(thread_type == ThreadType::kDefault ||
304 thread_type == ThreadType::kCompositing);
310 case ThreadType::kBackground:
314 case ThreadType::kUtility:
318 case ThreadType::kResourceEfficient:
322 case ThreadType::kDefault:
326 case ThreadType::kCompositing:
[all …]
Dsimple_thread.h67 explicit Options(ThreadType thread_type) : thread_type(thread_type) {} in Options()
77 ThreadType thread_type = ThreadType::kDefault;
/external/cronet/base/task/thread_pool/
Denvironment_config.h37 ThreadType thread_type_hint;
41 {"Foreground", base::ThreadType::kDefault},
42 {"ForegroundBlocking", base::ThreadType::kDefault},
43 {"Utility", base::ThreadType::kUtility},
44 {"UtilityBlocking", base::ThreadType::kUtility},
45 {"Background", base::ThreadType::kBackground},
46 {"BackgroundBlocking", base::ThreadType::kBackground},
Denvironment_config.cc41 if (!PlatformThread::CanChangeThreadType(ThreadType::kBackground, in CanUseBackgroundThreadTypeForWorkerThreadImpl()
42 ThreadType::kDefault)) in CanUseBackgroundThreadTypeForWorkerThreadImpl()
52 if (!PlatformThread::CanChangeThreadType(ThreadType::kUtility, in CanUseUtilityThreadTypeForWorkerThreadImpl()
53 ThreadType::kDefault)) in CanUseUtilityThreadTypeForWorkerThreadImpl()
Dpooled_single_thread_task_runner_manager_unittest.cc264 ThreadType expected_thread_type; in TEST_P()
267 CanUseBackgroundThreadTypeForWorkerThread() ? ThreadType::kBackground in TEST_P()
268 : use_utility_thread_group_ ? ThreadType::kUtility in TEST_P()
269 : ThreadType::kDefault}, in TEST_P()
271 CanUseBackgroundThreadTypeForWorkerThread() ? ThreadType::kBackground in TEST_P()
272 : use_utility_thread_group_ ? ThreadType::kUtility in TEST_P()
273 : ThreadType::kDefault}, in TEST_P()
275 ThreadType::kDefault}, in TEST_P()
277 use_utility_thread_group_ ? ThreadType::kUtility : ThreadType::kDefault}, in TEST_P()
279 use_utility_thread_group_ ? ThreadType::kUtility : ThreadType::kDefault}, in TEST_P()
[all …]
Dworker_thread.cc137 WorkerThread::WorkerThread(ThreadType thread_type_hint, in WorkerThread()
151 thread_type_hint_ != ThreadType::kBackground); in WorkerThread()
153 thread_type_hint != ThreadType::kUtility); in WorkerThread()
290 ThreadType WorkerThread::GetDesiredThreadType() const { in GetDesiredThreadType()
293 return ThreadType::kDefault; in GetDesiredThreadType()
298 void WorkerThread::UpdateThreadType(ThreadType desired_thread_type) { in UpdateThreadType()
312 if (thread_type_hint_ == ThreadType::kBackground) { in ThreadMain()
421 GetDesiredThreadType() != ThreadType::kBackground; in RunWorker()
427 base::HangWatcher::ThreadType::kThreadPoolThread); in RunWorker()
Dworker_thread.h113 WorkerThread(ThreadType thread_type_hint,
189 ThreadType GetDesiredThreadType() const;
193 void UpdateThreadType(ThreadType desired_thread_type);
249 const ThreadType thread_type_hint_;
254 ThreadType current_thread_type_;
Dworker_thread_unittest.cc97 ThreadType::kDefault, std::make_unique<TestWorkerThreadDelegate>(this), in SetUp()
564 MakeRefCounted<WorkerThread>(ThreadType::kDefault, WrapUnique(delegate), in TEST()
592 MakeRefCounted<WorkerThread>(ThreadType::kDefault, std::move(delegate), in TEST()
619 MakeRefCounted<WorkerThread>(ThreadType::kDefault, std::move(delegate), in TEST()
647 MakeRefCounted<WorkerThread>(ThreadType::kDefault, std::move(delegate), in TEST()
677 MakeRefCounted<WorkerThread>(ThreadType::kDefault, std::move(delegate), in TEST()
731 MakeRefCounted<WorkerThread>(ThreadType::kDefault, std::move(delegate), in TEST()
762 void SetExpectedThreadType(ThreadType expected_thread_type) { in SetExpectedThreadType()
791 ThreadType expected_thread_type_ = ThreadType::kDefault;
817 delegate_raw->SetExpectedThreadType(ThreadType::kBackground); in TEST()
[all …]
/external/rust/crates/jni/src/wrapper/java_vm/
Dvm.rs199 Err(_) => self.attach_current_thread_impl(ThreadType::Normal), in attach_current_thread_permanently()
220 let env = self.attach_current_thread_impl(ThreadType::Normal)?; in attach_current_thread()
254 Err(_) => self.attach_current_thread_impl(ThreadType::Daemon), in attach_current_thread_as_daemon()
279 fn attach_current_thread_impl(&self, thread_type: ThreadType) -> Result<JNIEnv> { in attach_current_thread_impl()
282 if thread_type == ThreadType::Daemon { in attach_current_thread_impl()
345 enum ThreadType { enum
/external/cronet/net/third_party/quiche/src/quiche/quic/core/
Dquic_connection_context_test.cc123 using ThreadType = TestThread<func>; in RunInThreads() typedef
124 std::vector<ThreadType> threads(n_threads); in RunInThreads()
126 for (ThreadType& t : threads) { in RunInThreads()
130 for (ThreadType& t : threads) { in RunInThreads()

123