Re: accessing each pthread's context



You can send a thread a signal and make the signal handler make a stack
dump on Linux. I can get you some code examples if you'd like. I do
some code I have that checks for certain lock violations. If it detects
such a violation, it sends the offending thread a signal so I can find
out where that code is.

I'm not sure how you would get that signal to every thread though,
perhaps some trick with
/proc to find all the threads in the process.

DS

.