Home
last modified time | relevance | path

Searched refs:CPUEUTask (Results 1 – 25 of 49) sorted by relevance

12

/ohos5.0/foundation/resourceschedule/ffrt/src/tm/
H A Dtask_factory.h28 static CPUEUTask *Alloc() in Alloc()
33 static void Free(CPUEUTask *task) in Free()
55 static void RegistCb(TaskAllocCB<CPUEUTask>::Alloc &&alloc, TaskAllocCB<CPUEUTask>::Free &&free,
56 TaskAllocCB<CPUEUTask>::GetUnfreedMem &&getUnfreedMem = nullptr,
57 TaskAllocCB<CPUEUTask>::LockMem &&lockMem = nullptr,
58 TaskAllocCB<CPUEUTask>::UnlockMem &&unlockMem = nullptr)
68 TaskAllocCB<CPUEUTask>::Free free_;
69 TaskAllocCB<CPUEUTask>::Alloc alloc_;
70 TaskAllocCB<CPUEUTask>::GetUnfreedMem getUnfreedMem_;
71 TaskAllocCB<CPUEUTask>::LockMem lockMem_;
[all …]
H A Dcpu_task.h43 class CPUEUTask : public CoTask {
45 CPUEUTask(const task_attr_private *attr, CPUEUTask *parent, const uint64_t &id, const QoS &qos);
50 CPUEUTask* parent = nullptr;
53 std::vector<CPUEUTask*> in_handles;
98 inline bool ExecutedOnWorker(CPUEUTask* task) in ExecutedOnWorker()
103 inline bool LegacyMode(CPUEUTask* task) in LegacyMode()
108 inline bool BlockThread(CPUEUTask* task) in BlockThread()
113 inline bool ThreadWaitMode(CPUEUTask* task) in ThreadWaitMode()
130 inline bool ThreadNotifyMode(CPUEUTask* task) in ThreadNotifyMode()
H A Dcpu_task.cpp30 void CPUEUTask::SetQos(const QoS& newQos) in SetQos()
44 void CPUEUTask::FreeMem() in FreeMem()
54 void CPUEUTask::Execute() in Execute()
74 CPUEUTask::CPUEUTask(const task_attr_private *attr, CPUEUTask *parent, const uint64_t &id, in CPUEUTask() function in ffrt::CPUEUTask
H A Dscpu_task.h22 class SCPUEUTask : public CPUEUTask {
24 …SCPUEUTask(const task_attr_private *attr, CPUEUTask *parent, const uint64_t &id, const QoS &qos = …
85 CPUEUTask* Root() in Root()
/ohos5.0/foundation/resourceschedule/ffrt/src/sync/
H A Dpoller.h61 CPUEUTask* task = nullptr;
74 CPUEUTask* task = nullptr;
111 uint64_t GetTaskWaitTime(CPUEUTask* task) noexcept;
116 void ClearCachedEvents(CPUEUTask* task) noexcept;
120 void WakeSyncTask(std::unordered_map<CPUEUTask*, EventVec>& syncTaskEvents) noexcept;
121 void ProcessWaitedFds(int nfds, std::unordered_map<CPUEUTask*, EventVec>& syncTaskEvents,
125 void ProcessTimerDataCb(CPUEUTask* task) noexcept;
128 void CacheEventsAndDoMask(CPUEUTask* task, EventVec& eventVec) noexcept;
129 int FetchCachedEventAndDoUnmask(CPUEUTask* task, struct epoll_event* eventsVec) noexcept;
142 std::unordered_map<CPUEUTask*, SyncData> m_waitTaskMap;
[all …]
H A Dwait_queue.cpp31 void WaitQueue::ThreadWait(WaitUntilEntry* wn, mutexPrivate* lk, bool legacyMode, CPUEUTask* task) in ThreadWait()
49 const TimePoint& tp, bool legacyMode, CPUEUTask* task) in ThreadWaitUntil()
83 CPUEUTask* task = ctx->task; in SuspendAndWait()
91 CoWait([&](CPUEUTask* task) -> bool { in SuspendAndWait()
129 CPUEUTask* task = ctx->task; in SuspendAndWaitUntil()
138 ffrt::CPUEUTask* task = wue->task; in SuspendAndWaitUntil()
146 CoWait([&](CPUEUTask* task) -> bool { in SuspendAndWaitUntil()
212 CPUEUTask* task = we->task; in Notify()
H A Dwait_queue.h26 class CPUEUTask; variable
56 CPUEUTask* task = nullptr;
93 void ThreadWait(WaitUntilEntry* wn, mutexPrivate* lk, bool legacyMode, CPUEUTask* task);
94 …Until(WaitUntilEntry* wn, mutexPrivate* lk, const TimePoint& tp, bool legacyMode, CPUEUTask* task);
H A Dsleep.cpp35 CPUEUTask* ExecuteCtxTask() in ExecuteCtxTask()
57 CoWait([&](CPUEUTask* task) -> bool { return DelayedWakeup(to, &task->fq_we, cb); }); in SleepUntilImpl()
81 CoWait([](ffrt::CPUEUTask* task) -> bool { in __anondab030b90302()
H A Dpoller.cpp98 void Poller::ClearCachedEvents(CPUEUTask* task) noexcept in ClearCachedEvents()
147 int Poller::FetchCachedEventAndDoUnmask(CPUEUTask* task, struct epoll_event* eventsVec) noexcept in FetchCachedEventAndDoUnmask()
204 CoWait([&](CPUEUTask *task)->bool { in WaitFdEvent()
240 void Poller::ProcessWaitedFds(int nfds, std::unordered_map<CPUEUTask*, EventVec>& syncTaskEvents, in ProcessWaitedFds() argument
265 void WakeTask(CPUEUTask* task) in WakeTask()
300 void Poller::CacheEventsAndDoMask(CPUEUTask* task, EventVec& eventVec) noexcept in CacheEventsAndDoMask()
325 void Poller::WakeSyncTask(std::unordered_map<CPUEUTask*, EventVec>& syncTaskEvents) noexcept in WakeSyncTask() argument
333 CPUEUTask* currTask = taskEventPair.first; in WakeSyncTask()
348 uint64_t Poller::GetTaskWaitTime(CPUEUTask* task) noexcept in GetTaskWaitTime()
412 std::unordered_map<CPUEUTask*, EventVec> syncTaskEvents; in PollOnce()
[all …]
/ohos5.0/foundation/resourceschedule/ffrt/src/eu/
H A Dco_routine.h34 class CPUEUTask; variable
65 const std::function<bool(ffrt::CPUEUTask*)>* pending = nullptr;
77 ffrt::CPUEUTask* task;
106 using CowakeCB = std::function<void (ffrt::CPUEUTask*, bool)>;
110 static void CoWakeFunc(ffrt::CPUEUTask* task, bool timeOut) in CoWakeFunc()
126 int CoStart(ffrt::CPUEUTask* task, CoRoutineEnv* coRoutineEnv);
129 void CoWait(const std::function<bool(ffrt::CPUEUTask*)>& pred);
130 void CoWake(ffrt::CPUEUTask* task, bool timeOut);
135 void TaskTsdDeconstruct(ffrt::CPUEUTask* task);
H A Dco_routine.cpp91 bool IsTaskLocalEnable(ffrt::CPUEUTask* task) in IsTaskLocalEnable()
118 void SwitchTsdAddrToTask(ffrt::CPUEUTask* task) in SwitchTsdAddrToTask()
125 void SwitchTsdToTask(ffrt::CPUEUTask* task) in SwitchTsdToTask()
139 bool SwitchTsdAddrToThread(ffrt::CPUEUTask* task) in SwitchTsdAddrToThread()
168 void SwitchTsdToThread(ffrt::CPUEUTask* task) in SwitchTsdToThread()
184 void TaskTsdRunDtors(ffrt::CPUEUTask* task) in TaskTsdRunDtors()
192 void TaskTsdDeconstruct(ffrt::CPUEUTask* task) in TaskTsdDeconstruct()
227 ffrt::CPUEUTask* task = co->task; in CoStartEntry()
339 static inline int CoAlloc(ffrt::CPUEUTask* task) in CoAlloc()
360 static inline int CoCreat(ffrt::CPUEUTask* task) in CoCreat()
[all …]
H A Dcpu_worker.cpp41 void CPUWorker::Run(CPUEUTask* task, CoRoutineEnv* coRoutineEnv, CPUWorker* worker) in Run()
118 CPUEUTask* task = reinterpret_cast<CPUEUTask*>(curtask); in RunTask()
166 CPUEUTask* task = worker->ops.PickUpTaskBatch(worker); in GetTask()
189 CPUEUTask* task = worker->ops.PickUpTaskBatch(worker); in GetTask()
262 CPUEUTask* task = worker->ops.PickUpTaskBatch(worker); in WorkerLooperDefault()
H A Dcpuworker_manager.cpp95 CPUEUTask* CPUWorkerManager::PickUpTaskFromGlobalQueue(WorkerThread* thread) in PickUpTaskFromGlobalQueue()
108 CPUEUTask* CPUWorkerManager::PickUpTaskFromLocalQueue(WorkerThread* thread) in PickUpTaskFromLocalQueue()
116 return reinterpret_cast<CPUEUTask*>(task); in PickUpTaskFromLocalQueue()
119 CPUEUTask* CPUWorkerManager::PickUpTaskBatch(WorkerThread* thread) in PickUpTaskBatch()
128 CPUEUTask* task = sched.PickNextTask(); in PickUpTaskBatch()
149 CPUEUTask* task2local = sched.PickNextTask(); in PickUpTaskBatch()
H A Dcpuworker_manager.h100 CPUEUTask* PickUpTaskFromGlobalQueue(WorkerThread* thread);
101 CPUEUTask* PickUpTaskFromLocalQueue(WorkerThread* thread);
109 CPUEUTask* PickUpTaskBatch(WorkerThread* thread);
/ohos5.0/foundation/resourceschedule/ffrt/src/sched/
H A Dsched_deadline.cpp33 void Begin(CPUEUTask* task) in Begin()
39 void End(CPUEUTask* task) in End()
47 uint64_t GetLoad(CPUEUTask* task) in GetLoad()
53 void Begin(CPUEUTask* task)
57 void End(CPUEUTask* task)
61 uint64_t GetLoad(CPUEUTask* task)
H A Dtask_runqueue.h27 virtual void EnQueue(CPUEUTask* task) = 0;
28 virtual CPUEUTask* DeQueue() = 0;
42 void EnQueue(CPUEUTask* task) override in EnQueue()
49 CPUEUTask* DeQueue() override in DeQueue()
64 return reinterpret_cast<CPUEUTask *>(w); in DeQueue()
68 CPUEUTask* tsk = entry->task; in DeQueue()
H A Dexecute_ctx.h53 class CPUEUTask; variable
58 explicit WaitEntry(CPUEUTask *task) : prev(nullptr), next(nullptr), task(task), weType(0), in WaitEntry()
64 CPUEUTask* task;
73 …explicit WaitUntilEntry(CPUEUTask* task) : WaitEntry(task), status(we_status::INIT), hasWaitTime(f… in WaitUntilEntry()
92 CPUEUTask* task; // 当前正在执行的Task
H A Dsched_deadline.h24 void Begin(CPUEUTask* task);
25 void End(CPUEUTask* task);
26 uint64_t GetLoad(CPUEUTask* task);
H A Dscheduler.h76 virtual bool WakeupTask(CPUEUTask* task);
81 …TaskState::RegisterOps(TaskState::READY, ([this] (CPUEUTask* task) { return this->WakeupTask(task)… in FFRTScheduler()
91 void ResetDeadline(CPUEUTask* task, int64_t deadline) in ResetDeadline()
102 void updateTask(CPUEUTask* task, int64_t deadline) in updateTask()
114 void UpdateChildTask(CPUEUTask* task, int64_t deadline) in UpdateChildTask()
H A Dtask_state.h27 class CPUEUTask; variable
33 using Op = typename std::function<bool(CPUEUTask*)>;
101 static int OnTransition(State state, CPUEUTask* task, Op&& op = Op());
116 inline void Count(CPUEUTask* task);
H A Dtask_scheduler.h37 CPUEUTask* PickNextTask() in PickNextTask()
39 CPUEUTask* task = que->DeQueue(); in PickNextTask()
44 bool WakeupTask(CPUEUTask* task) in WakeupTask()
/ohos5.0/foundation/resourceschedule/ffrt/src/dfx/bbox/
H A Dbbox.cpp44 static CPUEUTask* g_cur_task;
103 CPUEUTask* t = reinterpret_cast<CPUEUTask*>(worker->localFifo.PopHead()); in SaveLocalFifoStatus()
121 CPUEUTask* t = thread.first->curTask; in SaveWorkerStatus()
172 std::vector<CPUEUTask*> tmp; in SaveNormalTaskStatus()
174 auto t = reinterpret_cast<CPUEUTask*>(task); in SaveNormalTaskStatus()
201 apply("blocked by task dependence", [](CPUEUTask* t) { in SaveNormalTaskStatus()
204 apply("pending task", [](CPUEUTask* t) { in SaveNormalTaskStatus()
497 CPUEUTask* t = thread.first->curTask; in SaveWorkerStatusInfo()
568 std::vector<CPUEUTask*> tmp; in SaveNormalTaskStatusInfo()
570 auto t = reinterpret_cast<CPUEUTask*>(task); in SaveNormalTaskStatusInfo()
[all …]
/ohos5.0/foundation/resourceschedule/ffrt/src/util/
H A Dinit.cpp34 [] () -> ffrt::CPUEUTask* { in ffrt_init()
35 … return static_cast<ffrt::CPUEUTask*>(ffrt::SimpleAllocator<ffrt::SCPUEUTask>::AllocMem()); in ffrt_init()
37 [] (ffrt::CPUEUTask* task) { in ffrt_init()
47 [] (ffrt::CPUEUTask* task, bool timeOut) -> void {CoWake(task, timeOut);}); in ffrt_init()
H A Dworker_monitor.h26 CPUEUTask* task_ = nullptr;
32 explicit TaskTimeoutInfo(CPUEUTask* task) : task_(task) {} in TaskTimeoutInfo()
87 CPUEUTask* workerTask, std::vector<TimeoutFunctionInfo>& timeoutFunctions);
/ohos5.0/foundation/resourceschedule/ffrt/src/dm/
H A Ddependence_manager.h63 inline void InsDedup(std::vector<CPUEUTask*> &in_handles, std::vector<const void *> &insNoDup, in InsDedup()
69 ((ffrt::CPUEUTask*)(ins->items[i].ptr))->IncDeleteRef(); in InsDedup()
70 in_handles.emplace_back((ffrt::CPUEUTask*)(ins->items[i].ptr)); in InsDedup()
110 virtual void onTaskDone(CPUEUTask* task) = 0;
112 static inline CPUEUTask* Root() in Root()

12