list_del(&t->pre_select_node);
if (t->post_select)
list_del(&t->post_select_node);
- if (t->error >= 0)
- t->error = -E_TASK_KILLED;
+ t->error = -E_TASK_UNREGISTERED;
};
{
struct task *t, *tmp;
list_for_each_entry_safe(t, tmp, &pre_select_list, pre_select_node) {
- t->pre_select(s, t);
+ if (t->error >= 0)
+ t->pre_select(s, t);
// PARA_INFO_LOG("%s \n", t->status);
if (t->error >= 0)
continue;
struct task *t, *tmp;
list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) {
- t->post_select(s, t);
+ if (t->error >= 0)
+ t->post_select(s, t);
// PARA_INFO_LOG("%s: %d\n", t->status, t->ret);
if (t->error >= 0)
continue;
return;
list_for_each_entry_safe(t, tmp, &pre_select_list, pre_select_node)
unregister_task(t);
- /* remove tasks which do not have a pre_select hook */
list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node)
unregister_task(t);
initialized = 0;
if (strcmp(id, buf))
continue;
t->error = -E_TASK_KILLED;
- unregister_task(t);
return 1;
}
list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) {
if (strcmp(id, buf))
continue;
t->error = -E_TASK_KILLED;
- unregister_task(t);
return 1;
}
return -E_NO_SUCH_TASK;