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?
Yes, you can wrap the code in preempt_disable();
/ preempt_enable();
. Note that this does not block interrupts.