Hi List,

I am debugging Linux kernel using gdb (KGDB patch). I am successsfully
able to set breakpoints in the kernel and step though the code as far
as a single thread of execution is concerned.

However, I was curious so as to how can I simulate and debug a race
condition that involves multiple threads?

For e.g., I want to simulate and analyse the state of some data structures when:

Process P1 takes a semaphore S.
......
(At certain time) Process P2 becomes runnable and preempts P1

How do I perform a context switch and simulate that "while P1 is
executing this instruction, P2 preempts it". Is it possible?

Thanks,

Rick
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to