TK_BLOCK vs TK_SLEEP ?????

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

TK_BLOCK vs TK_SLEEP ?????

1,719 次查看
daverj
Contributor I
I built a board that is similar to the M52235EVB board, with a few different pieces of hardware.

I am using Codewarrior 7.1 and the new ColdFire Lite 3.0 code that was released a few weeks ago.

I am using the ColdFire Lite RTOS build

I have created a couple of tasks and run them, and they work fine if I use TK_SLEEP(1) in them. If I use TK_BLOCK() then my task is never heard from again.

From the documentation I was under the impression that TK_BLOCK gives up control to the next available task, and I was under the impression that control would return to my task after one cycle through the list of tasks.

This does not appear to be the case.

Am I misunderstanding TK_BLOCK? or is there a bug in the 3.0 version of ColdFire Lite RTOS build?

标签 (1)
0 项奖励
回复
1 回复

1,033 次查看
daverj
Contributor I
Nevermind.

I found further documentation that says TK_BLOCK is not what I thought it was. It is basically to put the task to sleep indefinitely, until something else in the system wakes it up.

TK_YIELD() is the function to pass control to the next task and come back after once around the task list.
0 项奖励
回复