how to create a blocked task using processor expert

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to create a blocked task using processor expert

841件の閲覧回数
hunglam
Contributor II

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

0 件の賞賛
返信
1 返信

728件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信