TK_BLOCK vs TK_SLEEP ?????

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TK_BLOCK vs TK_SLEEP ?????

1,102 Views
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?

Labels (1)
0 Kudos
Reply
1 Reply

416 Views
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 Kudos
Reply