Hi,
I am bit new to device driver programming. I would like to know how to
prevent context switching between threads.
Here is the scenario:
Thread A is running at PASSIVE LEVEL, driver gets into some funny state and
hence I want to panic the system so that I can get a memory dump to diaognise
the problem. So before crashing, I copy required data in a temporary buffer.
When I am about to panic the system, another thread B gets scheduled,
pre-empts the already running thread A, does context switching, runs for a
short burst and modifies data from my main buffer. Once thread B finishes,
thread A resumes the operation and panics the system. When I analyze memory
dump, I notice that contents in temp buffer and main buffer differ as thread
B modifies main buffer.
I want to know how do I prevent this context switching between threads A and
B? As soon as I get into funny state, I want to copy the data in temporary
buffer and crash the system.
Thanks.