Stop pre-emption

Hi there.

I have a system critical function that i want to protect from being stopped by the qnx system scheduled. I guess one was to do this would be to temperarily raise the priority to 255 and set to FIFO? But I don’t think this would stop interrupts being handled, and also this in not a very nice method in my eyes.

Does anyone know if there is a QNX function call to deal with this sort of thing? for example:

// Do some critical stuff


InterruptEnable(),InterruptDisable(), InterruptLock(), InterruptUnlock() are your friends.

That’s exactly right. Just be aware that all kernel calls turn interrupts back on again, so you have to be careful what code goes between the Disable/Enable pair. For example, printf() will re-enable interrupts.