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

can you use os_create_task() in an interrupt?

Is it possible to use os_create_task() from rtx tiny from within an ISR? Can it corrupt the stack?

Parents Reply Children
  • To guarantee a task is created, use os_create_task() from task 0's initialization code, i.e. before it does any work. The created task can then be then run, but arrange for the created task to block with os_wait1(). Later on, at the end of initialization, turn on the interrupts. An isr_send_signal() within the ISR handler then wakes it up, and you get the effect I think you want.