Jump to content

Recommended Posts

hi, I cant understand how works this function. It is a little confuse to me.
Sys_yield() causes a task switch. The NOVO RTOS is co-operative, that is one task has to yield before another task gets the chance to do anything.

 

Regards

Dave

Share this post


Link to post
Share on other sites
it should be always at the end of a task?

Most tasks consist of an infinite loop, Sys_yield() is called at some point in the task to allow other tasks to get a chance to do some work. So no its not generall called at the end.

Some task want to sleep for some time before waking up to do some checks before going back to sleep again. In this case the Sys_sleep() function is called. Sys_sleep() internally calls Sys_yield().

 

Please take a look at the supplied examples.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...