How to get a kthread ID?

Julian Elischer julian at elischer.org
Thu Oct 25 13:37:25 PDT 2007


Dag-Erling Smørgrav wrote:
> Sergey Matveychuk <sem at FreeBSD.org> writes:
>> Is there a possibility to get a kthread ID inside a kthread?
>> Just like pthread_self(3).
> 
> curthread?

well that's a thread pointer, but you are I guess correct because from there
you can get to curthread->td_tid which is the thread ID.

> 
> DES



More information about the freebsd-hackers mailing list