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

os_tsk_prio in interrupt rutine

Hello!

I was wandering, is it safe to call os_tsk_prio()inside a interrupt rutine? Are any os_ functions safe to call from interrupts or are only isr_ functions allowed?

Thanks for your answers.

Parents
  • The official information is that only the functions with isr_ names may be called.

    Why would you want to change any priority in the ISR? Normal is to have a high-prio thread sleeping until the ISR signals that there are work to do. Then the sleeping thread will activate and win over lower-prio threads.

    Did you intend to have the same thread perform both low-prio and high-prio jobs? Thats normally not a good idea - if it is already busy with low-prio work, then it needs to finish that work before it spots that there are high-prio jobs to perform. You get better response times with separate tasks for different priorities.

Reply
  • The official information is that only the functions with isr_ names may be called.

    Why would you want to change any priority in the ISR? Normal is to have a high-prio thread sleeping until the ISR signals that there are work to do. Then the sleeping thread will activate and win over lower-prio threads.

    Did you intend to have the same thread perform both low-prio and high-prio jobs? Thats normally not a good idea - if it is already busy with low-prio work, then it needs to finish that work before it spots that there are high-prio jobs to perform. You get better response times with separate tasks for different priorities.

Children