Sunday, February 20, 2022

[SOLVED] force linux kernel to run code without preempting

Issue

I'm writing a Linux kernel(android Linux kernel) module. I have a general question . is it possible to force kernel run a part of code in non-preemptive mode?


Solution

Yes, you can wrap the code in preempt_disable(); / preempt_enable();. Note that this does not block interrupts.



Answered By - caf
Answer Checked By - Mildred Charles (WPSolving Admin)