On Fri, Apr 1, 2011 at 11:33 AM, Greg Clayton <[email protected]> wrote: > Dooes linux or BSD have the notion of a thread ID for the current thread that > isn't just a pthread_t?
At least with OpenBSD's standard userspace threading library right now, you can't do any better than the (64-bit) pthread_t. Once we switch to kernel scheduled threads (which everyone's hoping will happen soon, but has been a slow multiyear project not likely to be fully ready for a while yet), you can use the OpenBSD-specific getthrid() system call, which returns a (32-bit) pid_t identifying the thread within that process. I imagine Linux and other BSDs with kernel scheduled threads have similar system calls to getthrid() already, but I'm not familiar with those details on other OS's. (I'm just an OpenBSD kernel hacker casually interested in LLVM; I'm not really even an expert on our threading/scheduling code.) _______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
