Lines Matching refs:task
37 void CPUWorker::Run(CPUEUTask* task, CPUWorker* worker)
40 if (CoStart(task) != 0) {
41 worker->localFifo.PushTail(task);
46 switch (task->type) {
49 FFRTSetStackId(task->stackId);
51 task->Execute();
55 QueueTask* sTask = reinterpret_cast<QueueTask*>(task);
65 FFRT_LOGE("run unsupport task[%lu], type=%d, name[%s]", task->gid, task->type, task->label.c_str());
71 void CPUWorker::Run(ffrt_executor_task_t* task, ffrt_qos_t qos)
73 if (task == nullptr) {
74 FFRT_LOGE("task is nullptr");
78 ffrt_executor_task_type_t type = static_cast<ffrt_executor_task_type_t>(task->type);
89 FFRT_EXECUTOR_TASK_BEGIN(task);
90 func(task, qos);
93 FFRT_EXECUTOR_TASK_FINISH_MARKER(task); // task finish marker for uv task
108 CPUEUTask* task = reinterpret_cast<CPUEUTask*>(curtask);
109 worker->curTask = task;
110 worker->curTaskType_ = task->type;
115 worker->curTaskLabel_ = task->label;
116 worker->curTaskGid_ = task->gid;
118 ctx->task = task;
119 ctx->lastGid_ = task->gid;
120 Run(task, worker);
121 ctx->task = nullptr;
135 void CPUWorker::RunTaskLifo(ffrt_executor_task_t* task, CPUWorker* worker)
137 RunTask(task, worker);
143 // set a placeholder to prevent the task from being placed in the priority again
155 CPUEUTask* task = worker->ops.PickUpTaskBatch(worker);
156 // the worker is not notified when the task attribute is set not to notify worker
157 if (task != nullptr) {
158 if (task->type == ffrt_normal_task && !task->notifyWorker_) {
159 task->notifyWorker_ = true;
160 return task;
164 return task;
169 void* task = worker->priority_task;
171 if (task != &PLACE_HOLDER) {
172 return task;
228 // get task in the order of priority -> local queue -> global queue
246 CPUEUTask* task = worker->ops.PickUpTaskBatch(worker);
247 // the worker is not notified when the task attribute is set not to notify worker
248 if (task != nullptr) {
249 if (task->type == ffrt_normal_task && !task->notifyWorker_) {
250 task->notifyWorker_ = true;
254 ffrt_executor_task_t* work = reinterpret_cast<ffrt_executor_task_t*>(task);