Lines Matching refs:task
28 task = ctx->task;
31 void WaitQueue::ThreadWait(WaitUntilEntry* wn, mutexPrivate* lk, bool legacyMode, CPUEUTask* task)
35 task->blockType = BlockType::BLOCK_THREAD;
36 wn->task = task;
49 const TimePoint& tp, bool legacyMode, CPUEUTask* task)
55 task->blockType = BlockType::BLOCK_THREAD;
56 wn->task = task;
83 CPUEUTask* task = ctx->task;
84 if (ThreadWaitMode(task)) {
85 ThreadWait(&ctx->wn, lk, LegacyMode(task), task);
88 task->wue = new WaitUntilEntry(task);
89 FFRT_BLOCK_TRACER(task->gid, cnd);
90 CoWait([&](CPUEUTask* task) -> bool {
92 push_back(task->wue);
95 // The ownership of the task belongs to WaitQueue list, and the task cannot be accessed any more.
98 delete task->wue;
99 task->wue = nullptr;
126 CPUEUTask* task = ctx->task;
127 if (ThreadWaitMode(task)) {
128 return ThreadWaitUntil(&ctx->wn, lk, tp, LegacyMode(task), task);
130 task->wue = new WaitUntilEntry(task);
131 task->wue->hasWaitTime = true;
132 task->wue->tp = tp;
133 task->wue->cb = ([&](WaitEntry* we) {
135 ffrt::CPUEUTask* task = wue->task;
142 FFRT_LOGD("task(%d) time is up", task->gid);
143 CoRoutineFactory::CoWakeFunc(task, true);
145 FFRT_BLOCK_TRACER(task->gid, cnt);
146 CoWait([&](CPUEUTask* task) -> bool {
147 WaitUntilEntry* we = task->wue;
153 // The ownership of the task belongs to WaitQueue list, and the task cannot be accessed any more.
158 // The ownership of the task belongs to WaitQueue list, and the task cannot be accessed any more.
161 task->wakeupTimeOut = true;
163 // The ownership of the task belongs to WaitQueue list, and the task cannot be accessed any more.
167 ret = task->wakeupTimeOut;
168 task->wue = nullptr;
169 task->wakeupTimeOut = false;
177 // For wait task without timeout, we will be deleted after the wait task wakes up.
215 CPUEUTask* task = we->task;
216 if (ThreadNotifyMode(task) || we->weType == 2) {
219 if (BlockThread(task)) {
220 task->blockType = BlockType::BLOCK_COROUTINE;
221 we->task = nullptr;
230 CoRoutineFactory::CoWakeFunc(task, false);