From owner-cvs-src@FreeBSD.ORG Mon Sep 27 18:55:50 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E1D216A4F3 for ; Mon, 27 Sep 2004 18:55:48 +0000 (GMT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8743843D45 for ; Mon, 27 Sep 2004 18:55:47 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 20638 invoked from network); 27 Sep 2004 18:55:47 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 27 Sep 2004 18:55:46 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i8RIsVY0014057; Mon, 27 Sep 2004 14:55:40 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Julian Elischer Date: Mon, 27 Sep 2004 11:20:39 -0400 User-Agent: KMail/1.6.2 References: <200409241958.i8OJwm8Y051147@repoman.freebsd.org> <200409241633.06963.jhb@FreeBSD.org> <415492DE.4070801@elischer.org> In-Reply-To: <415492DE.4070801@elischer.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200409271120.39458.jhb@FreeBSD.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Joerg Wunsch Subject: Re: cvs commit: src/share/man/man9 kthread.9 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 18:55:52 -0000 On Friday 24 September 2004 05:34 pm, Julian Elischer wrote: > John Baldwin wrote: > >On Friday 24 September 2004 03:58 pm, Joerg Wunsch wrote: > >>joerg 2004-09-24 19:58:47 UTC > >> > >> FreeBSD src repository > >> > >> Modified files: > >> share/man/man9 kthread.9 > >> Log: > >> Document that kthread_exit()ing will cause a wakeup(9) on the thread > >> handle. > >> > >> MFC after: 1 week > > > >It's not the thread handle, it's the proc pointer: > > > > /* > > * If this is a kthread, then wakeup anyone waiting for it to > > exit. */ > > if (p->p_flag & P_KTHREAD) > > could be an idea to use something thread specific as it is possible that > kernel therads may some day become actual threads > in one "kernel" process. The things that stop this at the moment > include that there is no p_comm field in a thread so > 'ps' would ahve nothing to show to identify what the threads were.. I > have been considerring adding a td_desc > field to threads to be used in teh same way... Actually what I'm leaning towards is changing kthread_exit() to accept a pointer to a condition variable and doing a cv_broadcast() on that condition variable before calling exit1(). This allows the caller to better control what actual wakeup is done. I would like to have a thread name field as well, btw, but I would prefer it be called td_comm for histerical raisins. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org