We have a client where a new thread needs to inherit some configuration
from the thread that created it. Is there any way for a thread_init callback
to get details of the creating thread? E.g. its drcontext_t or the values of
its TLS slots?
I realise that there's a risk of a race condition, where the creating thread
exits immediately before the new thread's thread_init gets to run.
Currently our fallback is to intercept the return from SYS_clone to get the
thread id, and stash some details that will be picked up when we see a
thread_init with that thread id, but it would be cleaner to have something
more direct.