Thread priority

If have some fundamental QNX questions:
Suppose 2 threads started from a main thread with FIFO enabled.

When the high priority thread is BLOCKED on an INTERRUPT WAIT the low priority thread that has the READY state starts. What does the scheduler do if the interrupt arrives and the high priority thread goes to READY state but the low priority thread is not yet blocked?
QNX Documentation say’s that the high priority wins, but is this not only true when the thread starts? Is going from BLOCKED to READY the same as starting the thread?

Thanks for your reply.

High priority thread will get the CPU when they want it. It’s not the thread that decides it’s the scheduler. The scheduler is invoked at every tick, every time there is an interrupt and everytime there is a kernel event ( message passing etc)

In your example when the interrupt occurs, the scheduler will schedule the high priority thread to run.

By the way FIFO is kinda bad, if you design rely on FIFO it will break on SMP machine.

Thanks for the quick reply, you’re answer is clear.

What is your advice if I shouldn’t use FIFO?

Stick with Round Robin ;-)