I have a multithreaded process using setitimer() with timer ITIMER_PROF. Signal handler is implemented for SIGPROF in which a shared memory is accessed and leverage std::mutex to ensure the shared memory wouldn't be messed up.
Then I got deadlock...
I'm pretty sure this mutex is only invoked in my signal handler.
Question: Is the deadlock caused by mutex preemption between 2 or more threads?