Apologies if I've missed this in the documentation but I'm looking for a way to suspend the Zephyr scheduler so that my task is not descheduled under any circumstances (until I re-enable the scheduler); I not been unable to find anything that does this so far.
I have found k_sched_lock() but that still deschedules the task should it do something that makes it unready. I've also found irq_lock() but again that is thread-specific so if the current thread is descheduled I'm back to where I started from.
Is there an organised way to good 'ole global scheduler suspend?