How to disable task yield

Have you been using other RTOS in the past? If yes which one supports the behavior you ask for? If not, there is a chance that you have a fundamental misunderstanding of an RTOS. As long as you do not tell us why you believe to need this feature, we will not be ahle to help you.

If you need precise timing windows, you are better off looking into timer interrupts than trying to tweak the RTOS do in on the application level. But that is only a wild guess as long as you keep your cards in your hands…