Monday, February 24, 2014

Task Management: Cancel activation

① Cancellation of activations

It is just simple that it makes the pending number of activations to zero in the task control block and returns the (cancelled) pending number of activations.

And, to note that the pending count is count of activations raised when the task is not in Dormant state. When the task exists, it is re-used to activate the task again. But, when the task is deleted, all counts just vanish.

② uITRON Implementation of can_act()

ER can_act(ID tskid)
{
        Sanity check on arguments
        Enter critical section
        Get the count of number of pending activations from the task control block
        Make the number of pending activations for the task to zero
        Exit critical section
        return the count
}

 

No comments: