Lines Matching defs:task
107 if (!ctx->task) {
111 struct WakeData data = {.fd = fd, .data = static_cast<void *>(ctx->task)};
114 FFRT_BLOCK_TRACER(ctx->task->gid, fd);
115 if (ThreadWaitMode(ctx->task)) {
116 std::unique_lock<std::mutex> lck(ctx->task->mutex_);
118 if (FFRT_UNLIKELY(LegacyMode(ctx->task))) {
119 ctx->task->blockType = BlockType::BLOCK_THREAD;
121 reinterpret_cast<SCPUEUTask*>(ctx->task)->waitCond_.wait(lck);
126 CoWait([&](CPUEUTask *task)->bool {
127 (void)task;
131 // The ownership of the task belongs to epoll, and the task cannot be accessed any more.
162 auto task = reinterpret_cast<CPUEUTask *>(data->data);
163 if (ThreadNotifyMode(task)) {
164 std::unique_lock<std::mutex> lck(task->mutex_);
165 if (BlockThread(task)) {
166 task->blockType = BlockType::BLOCK_COROUTINE;
168 reinterpret_cast<SCPUEUTask*>(task)->waitCond_.notify_one();
170 CoRoutineFactory::CoWakeFunc(task, false);