From owner-freebsd-current@FreeBSD.ORG Mon Jun 21 00:08:02 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C0AE16A4CE; Mon, 21 Jun 2004 00:08:02 +0000 (GMT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FE2B43D49; Mon, 21 Jun 2004 00:08:02 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc13) with ESMTP id <20040621000759016008urfme>; Mon, 21 Jun 2004 00:07:59 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA26601; Sun, 20 Jun 2004 17:07:57 -0700 (PDT) Date: Sun, 20 Jun 2004 17:07:56 -0700 (PDT) From: Julian Elischer To: Garance A Drosihn In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Cyrille Lefevre cc: hackers@freebsd.org cc: current@freebsd.org Subject: Re: -lthr vs. -pthread X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 00:08:02 -0000 this is a question for marcel, but basically "this may change". In current code the thread_id of the first thread is set to be equal to the PID. Marcel and I have discussed reworking the thread_id code and in the new code this will possibly not be true. Under KSE teh original thread has probably exited.. and the one availabel to run is number 100004. Under KSE threads are ephemeral, and come-and go as needed. (so the ID actually doesn't mean anything of rgeat significance) On Sun, 20 Jun 2004, Garance A Drosihn wrote: > At 4:14 AM +0200 6/20/04, Cyrille Lefevre wrote: > > > >is it normal that the selected process is the last forked thread > >and not the thread owner (father) ? > > I committed the changes, so people can try this if they want. > Example: > > (48) ps -HO lwp,nlwp > PID LWP NLWP TT STAT TIME COMMAND > 1870 1870 1 ?? SL 0:00.13 sshd: gad@ttyp3 (sshd) > 1871 1871 1 p3 SLs 0:00.09 -bash (bash) > 2535 100002 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100001 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100004 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 2535 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100000 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100003 6 p3 SL+ 0:00.00 ./cyr-thread > > (49) ps -O lwp,nlwp > PID LWP NLWP TT STAT TIME COMMAND > 1870 1870 1 ?? S 0:00.13 sshd: gad@ttyp3 (sshd) > 1871 1871 1 p3 Ss 0:00.09 -bash (bash) > 2535 100004 6 p3 S+ 0:00.00 ./cyr-thread > > When the -H is not requested, why does process 2535 show up as > thread-ID #100004 instead of #2535? Is that something that we > need to change when copying info into kproc_info ? Or is that > perfectly reasonable? I have not worked with threaded apps, > so I am not sure what people would be expecting here. > > -- > Garance Alistair Drosehn = gad@gilead.netel.rpi.edu > Senior Systems Programmer or gad@freebsd.org > Rensselaer Polytechnic Institute or drosih@rpi.edu > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >