本文整理汇总了C++中ACTIVE_TASK::resume_or_start方法的典型用法代码示例。如果您正苦于以下问题:C++ ACTIVE_TASK::resume_or_start方法的具体用法?C++ ACTIVE_TASK::resume_or_start怎么用?C++ ACTIVE_TASK::resume_or_start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACTIVE_TASK
的用法示例。
在下文中一共展示了ACTIVE_TASK::resume_or_start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unsuspend_all
// resume all currently scheduled tasks
//
void ACTIVE_TASK_SET::unsuspend_all(int reason) {
unsigned int i;
ACTIVE_TASK* atp;
for (i=0; i<active_tasks.size(); i++) {
atp = active_tasks[i];
if (atp->scheduler_state != CPU_SCHED_SCHEDULED) continue;
if (atp->task_state() == PROCESS_UNINITIALIZED) {
if (atp->resume_or_start(false)) {
msg_printf(atp->wup->project, MSG_INTERNAL_ERROR,
"Couldn't restart task %s", atp->result->name
);
}
} else if (atp->task_state() == PROCESS_SUSPENDED) {
atp->unsuspend(reason);
}
}
}