Date: Mon, 27 Sep 2004 11:20:39 -0400 From: John Baldwin <jhb@FreeBSD.org> To: Julian Elischer <julian@elischer.org> Cc: Joerg Wunsch <joerg@FreeBSD.org> Subject: Re: cvs commit: src/share/man/man9 kthread.9 Message-ID: <200409271120.39458.jhb@FreeBSD.org> In-Reply-To: <415492DE.4070801@elischer.org> References: <200409241958.i8OJwm8Y051147@repoman.freebsd.org> <200409241633.06963.jhb@FreeBSD.org> <415492DE.4070801@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409271120.39458.jhb>