185,6 → 185,7 |
#endif |
|
lev = (RMSTAR_level_des *)level_table[proc_table[p].task_level]; |
lev->deadline_timer[p] = NIL; |
|
switch (proc_table[p].status) { |
case RMSTAR_IDLE: |
368,13 → 369,13 |
if (proc_table[p].status != SLEEP) { |
/* a periodic task cannot be activated when it is already active */ |
/* but aperiodic task can be reactivate before */ |
if (lev->flag[p] & RMSTAR_FLAG_SPORADIC) { |
if (proc_table[p].status != RMSTAR_IDLE) { |
if (proc_table[p].status != RMSTAR_IDLE) { |
if (lev->flag[p] & RMSTAR_FLAG_SPORADIC) { |
lev->nact[p]++; |
return; |
} |
} else { |
kern_raise(XACTIVATION,p); |
} else { |
kern_raise(XACTIVATION,p); |
} |
} |
} |
|
468,6 → 469,7 |
/* count the deadline miss */ |
lev->dline_miss[p]++; |
kern_event_delete(lev->deadline_timer[p]); |
lev->deadline_timer[p] = NIL; |
} |
|
} |
475,11 → 477,16 |
#ifdef RMSTAR_DEBUG |
rmstar_printf("e%d",p); |
#endif |
if (lev->flag[p] & RMSTAR_FLAG_SPORADIC && lev->deadline_timer[p] != NIL) |
if (lev->flag[p] & RMSTAR_FLAG_SPORADIC && lev->deadline_timer[p] != NIL) { |
kern_event_delete(lev->deadline_timer[p]); |
lev->deadline_timer[p] = NIL; |
} |
|
/* the task has terminated his job before it consume the wcet. All OK! */ |
proc_table[p].status = RMSTAR_IDLE; |
if (lev->flag[p] & RMSTAR_FLAG_SPORADIC) |
proc_table[p].status = SLEEP; |
else |
proc_table[p].status = RMSTAR_IDLE; |
|
/* and finally, a preemption check! */ |
RMSTAR_check_preemption(lev); |
518,6 → 525,7 |
|
if (lev->deadline_timer[p] != -1) { |
kern_event_delete(lev->deadline_timer[p]); |
lev->deadline_timer[p] = NIL; |
} |
|
/* and finally, a preemption check! (it will also call guest_end) */ |