Re: thread_t, uthread_t, at al.?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Oct 27, 2006, at 1:50 AM, Rick Mann wrote: Hi, Mike this approach exists on other nix* like Linux , Solaris .... Cheers -plum _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... Can someone explain to me what thread_t is? I'm having a heckuva time locating its definition. There's a method in the XNU sources current_thread(), which returns a thread_t. You can call get_bsdthread_info() to get a uthread_t. But I'd like to know more about these threads. Is there documentation somewhere? In particular, how can I get the process ID owning a particular thread_t? The source is the documentation for this sort of thing, and being an implementation detail it's not something that you should expect to stay nailed down. Colloquially speaking, the thread_t is the mach thread handle, and the uthread is the BSD-side thread information (historically, the U area was part of the process' address space holding certain process- specific information). I don't believe that there is KPI to easily do what you're asking. Why do you want to know the PID associated with an arbitrary thread? Is it not something you can obtain while you are being run on that thread? = Mike This email sent to site_archiver@lists.apple.com
participants (1)
-
plumber Idraulico