prev_tid = $prev_p->pid
prev_task = $prev_p
prev_task_name = task_execname($prev_p)
- prevtsk_state = $prev_p->state
+ prevtsk_state = task_state($prev_p)
}
else {
prev_priority = $prev->prio
prev_tid = $prev->pid
prev_task = $prev
prev_task_name = task_execname($prev)
- prevtsk_state = $prev->state
+ prevtsk_state = task_state($prev)
}
if (@defined($next)) {
next_tid = $next->pid
next_task = $next
next_task_name = task_execname($next)
- nexttsk_state = $next->state
+ nexttsk_state = task_state($next)
}
else if (@defined($next_p)) {
next_priority = $next_p->prio
next_tid = $next_p->pid
next_task = $next_p
next_task_name = task_execname($next_p)
- nexttsk_state = $next_p->state
+ nexttsk_state = task_state($next_p)
}
else {
next_priority = $new->prio
next_tid = $new->pid
next_task = $new
next_task_name = task_execname($new)
- nexttsk_state = $new->state
+ nexttsk_state = task_state($new)
}
}
// Task $prev is scheduled off this cpu
if (task_targeted($prev)) {
pid = $prev->pid
- state = $prev->state
+ state = task_state($prev)
update_times(pid, timestamp())
if (state > 0) {