Using pthreads for C, is there a way to access the program counter/instruction pointer for specific threads?
Example:
void *thread_main(void *arg) {
long thread = (long)arg;
lock (thread);
***print (thread.pc);***
critical_section (thread);
***print (thread.pc);***
unlock (thread);
return NULL;
}