MINOR: thread: add is_thread_harmless() to know if a thread already is harmless

The harmless status is not re-entrant, so sometimes for signal handling
it can be useful to know if we're already harmless or not. Let's add a
function doing that, and make the debugger use it instead of manipulating
the harmless mask.
2 files changed