• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: thread_t, uthread_t, at al.?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Re: thread_t, uthread_t, at al.?
      • From: "Shawn Erickson" <email@hidden>
References: 
 >thread_t, uthread_t, at al.? (From: Rick Mann <email@hidden>)
 >Re: thread_t, uthread_t, at al.? (From: Michael Smith <email@hidden>)

  • Prev by Date: seeking overview of scheduling on dual-core (or more)
  • Next by Date: Upgrading a ROM based KEXT
  • Previous by thread: Re: thread_t, uthread_t, at al.?
  • Next by thread: Re: Re: thread_t, uthread_t, at al.?
  • Index(es):
    • Date
    • Thread