Task Suspension

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Task Suspension

跳至解决方案
1,532 次查看
netra
Contributor IV

I am using mqx 3.5 (MCF52259),

I want to suspend a thread using shell command .

Can anyone tell me how to do??

1 解答
1,221 次查看
Martin_
NXP Employee
NXP Employee

https://community.freescale.com/message/329949#329949

for example, set an event or semaphore. the task would poll the event/semaphore in a while(1) loop and call _task_block() in response to it.  alternatively you can use task queue to suspend/resume tasks (_taskq_suspend_task(), _taskq_resume()).

在原帖中查看解决方案

2 回复数
1,222 次查看
Martin_
NXP Employee
NXP Employee

https://community.freescale.com/message/329949#329949

for example, set an event or semaphore. the task would poll the event/semaphore in a while(1) loop and call _task_block() in response to it.  alternatively you can use task queue to suspend/resume tasks (_taskq_suspend_task(), _taskq_resume()).

1,221 次查看
DavidS
NXP Employee
NXP Employee

Hi Netra,

Wow that is very old version of MQX.  Please note latest download (http://www.freescale.com/mqx) is MQX4.0.2.GA.

In your MQX3.5\docs\mqx\MQXUG.pdf please review information on the following:

2.6.7 Task Queues

In addition to providing a scheduling mechanism, task queues provide a simple and efficient way to

synchronize tasks. You can suspend tasks in the task queue and remove them from the task queue.

Regards,

David