Hi, a quick question.. how can I create a blocked task using processor expert? if it cannot be done, how can I modify the task created by processor expert to a blocked task? thanks
Hi lam:
I think you can use the API _task_block() to block the active task. The API removes the active task from the task's ready queue and sets the BLOCKED bit in the STATE field of the task descriptor. Please see the following task
void world_task
(
uint32_t initial_data
)
{
_task_id hello_task_id;
hello_task_id = _task_create(0, HELLO_TASK, 0);
if (hello_task_id == MQX_NULL_TASK_ID) {
printf ("\n Could not create hello_task\n");
} else {
printf(" World 3000 \n");
}
_task_block();
}
Regards
Daniel