kernel thread as real threads..

Daniel Eischen deischen at
Sun Jan 22 06:21:19 PST 2006

On Sat, 21 Jan 2006, M. Warner Losh wrote:

> In message: <Pine.GSO.4.43.0601201443570.1773-100000 at>
>             Daniel Eischen <deischen at> writes:
> : On Fri, 20 Jan 2006, Scott Long wrote:
> : >
> : > Does pthreads allow the programmer to name threads in a user and/or
> : > kernel visible way?  Is this something that is really all that
> : > important?
> :
> : Only in a non-portable way.  See pthread_set_name_np(3).
> This 'non-portable' way is in heavy use in at least one user of
> FreeBSD's software base.

Well, I'm not advocating its removal, just clarifying that
there is no POSIX interface for setting a thread's name.
I originally added that interface as a debugging aid for
application developers after finding it useful myself in
debugging the library.  I'm not sure you want to reuse the
same interface for setting kernel thread names.  For KSE
or libc_r type threads, it wouldn't work too well.


More information about the freebsd-current mailing list