This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question on RTX51Tiny os_wait

What would happen if you have an os_wait or os_wait2 call with an interval of X milliseconds, such as

while {TRUE) {
os_wait2(K_IVL, X);
//do some stuff
}

and the "stuff" takes more than X ticks?

Parents
  • This might actually be something to change in RTX51Tiny. If I have several tasks going on, and round-robin task switching turned off for efficiency, then there should be a "next_task" function that I can call simply to give other tasks a chance to execute when timing isn't critical. Calling "os_wait()" with a value of 0 would be sufficient. I rolled my own little RTS, before I could afford a copy of RTX51Tiny, and did just that. Each task would execute once through the "while (1)" loop and then pass control on to the next.
    Paul Blase

Reply
  • This might actually be something to change in RTX51Tiny. If I have several tasks going on, and round-robin task switching turned off for efficiency, then there should be a "next_task" function that I can call simply to give other tasks a chance to execute when timing isn't critical. Calling "os_wait()" with a value of 0 would be sufficient. I rolled my own little RTS, before I could afford a copy of RTX51Tiny, and did just that. Each task would execute once through the "while (1)" loop and then pass control on to the next.
    Paul Blase

Children