Re: thread_t, uthread_t, at al.?
Re: thread_t, uthread_t, at al.?
- Subject: Re: thread_t, uthread_t, at al.?
- From: plumber Idraulico <email@hidden>
- Date: Fri, 27 Oct 2006 12:45:16 +0200
On Oct 27, 2006, at 1:50 AM, Rick Mann wrote:
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
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden