How to get a kthread ID?

Marc Lörner marc.loerner at hob.de
Thu Oct 25 03:29:59 PDT 2007


On Thursday 25 October 2007 11:02, Sergey Matveychuk wrote:
> Is there a possibility to get a kthread ID inside a kthread?
> Just like pthread_self(3).

In function kthread_exit there you see that you can obtain the 
thread-structure with curthread. 
And then in this thread-structure is the field td_tid.

HTH,
Marc


More information about the freebsd-hackers mailing list