Home
last modified time | relevance | path

Searched refs:thread (Results 1 - 25 of 1701) sorted by relevance

12345678910>>...69

/foundation/communication/bluetooth_service/services/bluetooth/stack/platform/linux/
H A Dthread_linux.c16 #include "platform/include/thread.h"
44 Thread *thread; member
69 Thread *thread = startPromise->thread; in ThreadStartFunc() local
71 thread->tid = (long int)syscall(__NR_gettid); in ThreadStartFunc()
73 ReactorSetThreadId(thread->reactor, (unsigned long)pthread_self()); in ThreadStartFunc()
77 int fd = QueueGetDequeueFd(thread->taskQueue); in ThreadStartFunc()
78 ReactorItem *reactorItem = ReactorRegister(thread->reactor, fd, (void *)thread->taskQueue, ReadyToRead, NULL); in ThreadStartFunc()
81 if (ReactorStart(thread in ThreadStartFunc()
99 ThreadIsSelf(const Thread *thread) ThreadIsSelf() argument
109 ThreadStop(Thread *thread) ThreadStop() argument
125 Thread *thread = (Thread *)calloc(1, (sizeof(Thread))); ThreadCreate() local
177 ThreadDelete(Thread *thread) ThreadDelete() argument
191 ThreadPostTask(Thread *thread, TaskFunc func, void *context) ThreadPostTask() argument
205 ThreadGetReactor(const Thread *thread) ThreadGetReactor() argument
[all...]
/foundation/resourceschedule/ffrt/src/eu/
H A Dscpuworker_manager.cpp103 WorkerAction SCPUWorkerManager::WorkerIdleAction(const WorkerThread* thread) in WorkerIdleAction() argument
109 auto& ctl = sleepCtl[thread->GetQos()]; in WorkerIdleAction()
111 (void)monitor->IntoSleep(thread->GetQos()); in WorkerIdleAction()
112 FFRT_PERF_WORKER_IDLE(static_cast<int>(thread->GetQos())); in WorkerIdleAction()
116 if (ctl.cv.wait_for(lk, std::chrono::seconds(waiting_seconds), [this, thread] { in WorkerIdleAction()
117 bool taskExistence = GetTaskCount(thread->GetQos()) || in WorkerIdleAction()
118 reinterpret_cast<const CPUWorker*>(thread)->priority_task || in WorkerIdleAction()
119 reinterpret_cast<const CPUWorker*>(thread)->localFifo.GetLength(); in WorkerIdleAction()
120 bool needPoll = !FFRTFacade::GetPPInstance().GetPoller(thread->GetQos()).DetermineEmptyMap() && in WorkerIdleAction()
121 (polling_[thread in WorkerIdleAction()
153 PickUpTaskFromGlobalQueue(WorkerThread* thread) PickUpTaskFromGlobalQueue() argument
165 PickUpTaskBatch(WorkerThread* thread) PickUpTaskBatch() argument
204 WorkerPrepare(WorkerThread* thread) WorkerPrepare() argument
[all...]
H A Dcpuworker_manager.cpp93 CPUEUTask* CPUWorkerManager::PickUpTaskFromLocalQueue(WorkerThread* thread) in PickUpTaskFromLocalQueue() argument
99 CPUWorker* worker = reinterpret_cast<CPUWorker*>(thread); in PickUpTaskFromLocalQueue()
104 unsigned int CPUWorkerManager::StealTaskBatch(WorkerThread* thread) in StealTaskBatch() argument
110 if (GetStealingWorkers(thread->GetQos()) > groupCtl[thread->GetQos()].threads.size() / 2) { in StealTaskBatch()
114 std::shared_lock<std::shared_mutex> lck(groupCtl[thread->GetQos()].tgMutex); in StealTaskBatch()
115 AddStealingWorker(thread->GetQos()); in StealTaskBatch()
117 groupCtl[thread->GetQos()].threads.begin(); in StealTaskBatch()
118 while (iter != groupCtl[thread->GetQos()].threads.end()) { in StealTaskBatch()
121 if (iter->first != thread in StealTaskBatch()
133 TryPoll(const WorkerThread* thread, int timeout) TryPoll() argument
162 NotifyTaskPicked(const WorkerThread* thread) NotifyTaskPicked() argument
167 WorkerRetired(WorkerThread* thread) WorkerRetired() argument
247 IsExceedRunningThreshold(const WorkerThread* thread) IsExceedRunningThreshold() argument
[all...]
H A Dworker_thread.h24 #include <thread>
147 FFRT_LOGD("qos %d thread not joinable.", qos()); in Detach()
164 thread = std::thread(wrap, args...); in Start()
169 if (thread.joinable()) { in Join()
170 thread.join(); in Join()
177 if (thread.joinable()) { in Detach()
178 thread.detach(); in Detach()
180 FFRT_LOGD("qos %d thread not joinable\n", qos()); in Detach()
187 return this->thread in GetThread()
205 std::thread thread; global() member in ffrt::WorkerThread
[all...]
H A Dcpuworker_manager.h76 virtual void WorkerPrepare(WorkerThread* thread) = 0;
89 void WorkerRetired(WorkerThread* thread);
91 bool IsExceedRunningThreshold(const WorkerThread* thread);
99 void NotifyTaskPicked(const WorkerThread* thread);
101 virtual CPUEUTask* PickUpTaskFromGlobalQueue(WorkerThread* thread) = 0;
102 CPUEUTask* PickUpTaskFromLocalQueue(WorkerThread* thread);
105 virtual WorkerAction WorkerIdleAction(const WorkerThread* thread) = 0;
107 void WorkerSetup(WorkerThread* thread);
108 PollerRet TryPoll(const WorkerThread* thread, int timeout = -1);
109 unsigned int StealTaskBatch(WorkerThread* thread);
[all...]
H A Dworker_manager.cpp24 for (auto& thread : tgwrap.threads) { in JoinRtg()
25 pid_t tid = thread.first->Id(); in JoinRtg()
50 for (auto& thread : tgwrap.threads) { in JoinTG()
51 pid_t tid = thread.first->Id(); in JoinTG()
74 for (auto& thread : groupCtl[qos].threads) { in LeaveTG()
75 pid_t tid = thread.first->Id(); in LeaveTG()
H A Dscpuworker_manager.h25 WorkerAction WorkerIdleAction(const WorkerThread* thread) override;
26 void WorkerPrepare(WorkerThread* thread) override;
28 CPUEUTask* PickUpTaskFromGlobalQueue(WorkerThread* thread) override;
29 CPUEUTask* PickUpTaskBatch(WorkerThread* thread) override;
/foundation/ability/ability_runtime/test/unittest/appkit/child_main_thread_test/
H A Dchild_main_thread_test.cpp74 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); in HWTEST_F() local
75 ASSERT_NE(thread, nullptr); in HWTEST_F()
79 auto ret = thread->Init(runner, info); in HWTEST_F()
91 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); in HWTEST_F() local
92 ASSERT_NE(thread, nullptr); in HWTEST_F()
95 thread->mainHandler_ = std::make_shared<EventHandler>(runner); in HWTEST_F()
97 auto ret = thread->Attach(); in HWTEST_F()
109 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); in HWTEST_F() local
110 ASSERT_NE(thread, nullptr); in HWTEST_F()
114 thread in HWTEST_F()
129 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); HWTEST_F() local
163 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); HWTEST_F() local
198 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); HWTEST_F() local
217 sptr<ChildMainThread> thread = sptr<ChildMainThread>(new (std::nothrow) ChildMainThread()); HWTEST_F() local
[all...]
/foundation/ai/ai_engine/services/common/platform/threadpool/source/
H A Dthread_pool.cpp69 std::shared_ptr<Thread> thread; in Pop() local
76 thread.reset(ptr); in Pop()
78 thread = idleThreads_.front(); in Pop()
82 busyThreads_.push_back(thread); in Pop()
84 return thread; in Pop()
87 void ThreadPool::Push(std::shared_ptr<Thread> &thread) in Push() argument
89 thread->StopThread(); in Push()
93 if ((*iter)->GetThreadId() == thread->GetThreadId()) { in Push()
99 idleThreads_.push_back(thread); in Push()
111 for (auto &thread in StopThreads()
[all...]
/foundation/resourceschedule/ffrt/interfaces/inner_api/cpp/
H A Dthread.h21 class thread { class
23 thread() noexcept
28 class = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Fn>>, thread>>>
29 explicit thread(const char* name, qos qos_, Fn&& fn, Args&&... args) in thread() function in ffrt::thread
41 class = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Fn>>, thread>>>
42 explicit thread(qos qos_, Fn&& fn, Args&&... args) in thread() function in ffrt::thread
54 class = std::enable_if_t<!std::is_same_v<std::remove_cv_t<std::remove_reference_t<Fn>>, thread>>,
57 explicit thread(Fn&& fn, Args&& ... args) in thread() function in ffrt::thread
68 thread(const thread
[all...]
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/offscreen_render/
H A Drs_offscreen_render_thread_test.cpp91 std::shared_ptr<RSOffscreenRenderThread> thread = std::make_shared<RSOffscreenRenderThread>(); in HWTEST_F() local
92 EXPECT_NE(thread, nullptr); in HWTEST_F()
94 thread->renderContext_ = nullptr; in HWTEST_F()
95 thread->GetRenderContext(); in HWTEST_F()
96 thread->CleanGrResource(); in HWTEST_F()
98 thread->renderContext_ = std::make_shared<RenderContext>(); in HWTEST_F()
99 EXPECT_NE(thread->renderContext_, nullptr); in HWTEST_F()
100 EXPECT_NE(thread->GetRenderContext(), nullptr); in HWTEST_F()
102 thread->renderContext_->drGPUContext_ = nullptr; in HWTEST_F()
103 thread in HWTEST_F()
[all...]
/foundation/communication/dsoftbus/tests/adapter/unittest/
H A Dsoftbus_thread_test.cpp63 SoftBusThread thread = SoftBusThreadGetSelf(); in ThreadSelfTest() local
64 EXPECT_TRUE(thread != 0); in ThreadSelfTest()
446 * @tc.desc: thread is nullptr
468 SoftBusThread thread = 0; in HWTEST_F() local
470 int32_t ret = SoftBusThreadCreate(&thread, nullptr, SoftBusThreadTask, nullptr); in HWTEST_F()
472 EXPECT_TRUE(thread != 0); in HWTEST_F()
483 SoftBusThread thread = 0; in HWTEST_F() local
488 ret = SoftBusThreadCreate(&thread, &threadAttr, SoftBusThreadTask, nullptr); in HWTEST_F()
490 EXPECT_TRUE(thread != 0); in HWTEST_F()
502 SoftBusThread thread in HWTEST_F() local
522 SoftBusThread thread = 0; HWTEST_F() local
541 SoftBusThread thread = 0; HWTEST_F() local
560 SoftBusThread thread = 0; HWTEST_F() local
579 SoftBusThread thread = 0; HWTEST_F() local
598 SoftBusThread thread = 0; HWTEST_F() local
618 SoftBusThread thread = 0; HWTEST_F() local
635 SoftBusThread thread = 0; HWTEST_F() local
659 SoftBusThread thread = 0; HWTEST_F() local
683 SoftBusThread thread = 0; HWTEST_F() local
707 SoftBusThread thread = 0; HWTEST_F() local
729 SoftBusThread thread = 0; HWTEST_F() local
751 SoftBusThread thread = 0; HWTEST_F() local
770 SoftBusThread thread = 0; HWTEST_F() local
1008 SoftBusThread thread = 0; HWTEST_F() local
1029 SoftBusThread thread = 0; HWTEST_F() local
[all...]
/foundation/multimedia/camera_framework/services/deferred_processing_service/include/base/task_manager/
H A Dthread_pool.h27 #include <thread>
49 mutable std::thread thread; member
52 : name(std::move(name)), thread(std::move(func)) in ThreadInfo()
59 thread = std::move(other.thread); in ThreadInfo()
66 thread = std::move(other.thread); in operator =()
/foundation/communication/dsoftbus/tests/core/connection/wifi_direct_cpp/
H A Dwifi_direct_mock.cpp19 #include <thread>
379 std::thread thread(run); in CreateGroupSuccessAction()
380 thread.detach(); in CreateGroupSuccessAction()
391 std::thread thread(run); in CreateGroupFailureAction()
392 thread.detach(); in CreateGroupFailureAction()
403 std::thread thread(run); in CreateGroupTimeOutAction()
404 thread in CreateGroupTimeOutAction()
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/
H A Dtask_queue.cpp37 std::thread::id thisId = std::this_thread::get_id(); in GetTaskAutoLock()
39 if (lockThread_ == std::thread::id()) { in GetTaskAutoLock()
62 lockThread_ = std::thread::id(); in ReleaseLock()
69 if (lockThread_ != std::thread::id()) { in IsEmptyAndUnlocked()
79 if (lockThread_ != std::thread::id()) { in CanGetTask()
/foundation/graphic/graphic_2d/rosen/modules/platform/eventhandler_impl/
H A Devent_runner.cpp21 #include <thread>
40 // Invoke system call to set name of current thread.
47 HILOGE("SystemCallSetThreadName: Failed to set thread name, %{public}s", errmsg); in SystemCallSetThreadName()
60 // Thread collector is used to reclaim thread that needs to finish running.
71 // Get id of current thread. in ReclaimCurrentThread()
76 // Add thread id to list and notify to reclaim. in ReclaimCurrentThread()
91 // Start daemon thread to collect finished threads, if not exist. in ReclaimCurrentThread()
92 thread_ = std::make_unique<std::thread>(&ThreadCollector::Run, this); in ReclaimCurrentThread()
98 bool Deposit(std::unique_ptr<std::thread> &thread, cons argument
127 std::unique_ptr<std::thread> thread; global() member
349 Attach(std::unique_ptr<std::thread> &thread) Attach() argument
424 auto thread = Create() local
[all...]
/foundation/communication/bluetooth_service/services/bluetooth/stack/platform/include/
H A Dthread.h46 * @param thread Thread pointer.
49 void ThreadDelete(Thread *thread);
54 * @param thread Thread pointer.
59 void ThreadPostTask(Thread *thread, TaskFunc func, void *context);
62 * @brief Return whether current running thread is equal to thread in parameter.
64 * @param thread Thread pointer.
68 int32_t ThreadIsSelf(const Thread *thread);
73 * @param thread Thread pointer.
74 * @return Reactor of thread
[all...]
/foundation/graphic/graphic_2d/rosen/modules/render_service_profiler/
H A Drs_profiler_beta_recorder.cpp16 #include <thread>
71 std::thread thread([]() { in LaunchBetaRecordNotificationThread()
77 thread.detach(); in LaunchBetaRecordNotificationThread()
85 std::thread thread([]() { in LaunchBetaRecordMetricsUpdateThread()
97 thread.detach(); in LaunchBetaRecordMetricsUpdateThread()
107 std::thread thread([fileDataCopy{std::move(fileData)}, path]() { in WriteBetaRecordFileThread()
117 thread in WriteBetaRecordFileThread()
[all...]
/foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/rust/tests/
H A Dbasic.rs27 std::thread::sleep(std::time::Duration::from_secs(20)); in init()
29 std::thread::sleep(std::time::Duration::from_secs(20)); in init()
49 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
54 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
59 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
64 std::thread::sleep(std::time::Duration::from_secs(5)); in reason()
/foundation/multimedia/camera_framework/services/deferred_processing_service/src/base/task_manager/
H A Dthread_pool.cpp40 numThreads_ = std::min(numThreads_, static_cast<uint32_t>(std::thread::hardware_concurrency())); in ThreadPool()
51 if (threadInfo.thread.joinable()) { in ~ThreadPool()
52 DP_DEBUG_LOG("joining thread (%s).", threadInfo.name.c_str()); in ~ThreadPool()
53 threadInfo.thread.join(); in ~ThreadPool()
66 SetThreadName(workers_.back().thread.native_handle(), workers_.back().name); in Initialize()
91 SetThreadPriority(workerInfo.thread.native_handle(), PRIORITY_BACKGROUND); in BeginBackgroundTasks()
99 SetThreadPriority(workerInfo.thread.native_handle(), PRIORITY_NORMAL); in EndBackgroundTasks()
107 SetThreadPriority(workerInfo.thread.native_handle(), priority); in SetThreadPoolPriority()
113 return GetThreadPriority(workers_[0].thread.native_handle()); in GetThreadPoolPriority()
121 int ret = pthread_getschedparam(workerInfo.thread in PrintThreadInfo()
[all...]
/foundation/multimedia/audio_framework/frameworks/native/pulseaudio/modules/hdi/
H A Dsink_userdata.h27 #include <pulsecore/thread-mq.h>
28 #include <pulsecore/thread.h>
52 pa_thread *thread; member
92 pa_thread *thread; member
106 pa_thread *thread; member
129 pa_thread *thread; member
/foundation/filemanagement/dfs_service/utils/system/include/
H A Ddfsu_thread.h22 #include <thread>
48 thread_ = std::make_unique<std::thread>(std::forward<Fn>(Fx), std::forward<Args>(Ax)...); in Run()
59 thread_ = std::make_unique<std::thread>([this, task, interval, retryTimes] { in RunLoop()
83 thread_ = std::make_unique<std::thread>([this, task, interval, retryTimes] { in RunLoopFlexible()
112 LOGD("wait thread to stop"); in Stop()
120 bool operator==(std::thread::id id) in operator ==()
131 std::unique_ptr<std::thread> thread_ {nullptr};
/foundation/resourceschedule/ffrt/test/ut/testcase/
H A Dut_rtg.cpp18 #include <thread>
164 std::vector<std::thread> threads; in HWTEST_F()
185 threads.emplace_back(std::thread(f)); in HWTEST_F()
213 for (auto& thread : threads) { in HWTEST_F()
214 thread.join(); in HWTEST_F()
232 std::vector<std::thread> threads; in HWTEST_F()
253 threads.emplace_back(std::thread(f)); in HWTEST_F()
298 for (auto& thread : threads) { in HWTEST_F()
299 thread.join(); in HWTEST_F()
/foundation/ability/ability_runtime/frameworks/native/ability/native/
H A Dability_thread.cpp42 sptr<AbilityThread> thread = nullptr; in AbilityThreadMain() local
44 thread = sptr<AbilityRuntime::UIAbilityThread>::MakeSptr(); in AbilityThreadMain()
46 thread = sptr<AbilityRuntime::ExtensionAbilityThread>::MakeSptr(); in AbilityThreadMain()
48 thread = sptr<AbilityRuntime::FAAbilityThread>::MakeSptr(); in AbilityThreadMain()
50 if (thread == nullptr) { in AbilityThreadMain()
51 TAG_LOGE(AAFwkTag::ABILITY, "null thread"); in AbilityThreadMain()
54 thread->Attach(application, abilityRecord, mainRunner, stageContext); in AbilityThreadMain()
75 sptr<AbilityThread> thread = nullptr; in AbilityThreadMain() local
77 thread = sptr<AbilityRuntime::UIAbilityThread>::MakeSptr(); in AbilityThreadMain()
79 thread in AbilityThreadMain()
[all...]
/foundation/arkui/ace_engine/test/mock/core/image_provider/
H A Dmock_image_utils.cpp15 #include <thread>
25 std::vector<std::thread> g_threads;
39 // mock bg thread pool in PostToBg()
43 g_threads.emplace_back(std::thread(task)); in PostToBg()

Completed in 17 milliseconds

12345678910>>...69