TK_BLOCK vs TK_SLEEP ?????

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

TK_BLOCK vs TK_SLEEP ?????

1,517件の閲覧回数
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 返信

831件の閲覧回数
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 件の賞賛
返信