From owner-cvs-all@FreeBSD.ORG Thu Sep 23 23:27:17 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AC9516A4CF; Thu, 23 Sep 2004 23:27:17 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9B4243D39; Thu, 23 Sep 2004 23:27:16 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.34] (adsl-67-127-84-57.dsl.snfc21.pacbell.net [67.127.84.57]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id i8NNRFDl009379; Thu, 23 Sep 2004 16:27:16 -0700 Message-ID: <41535BD3.1020609@root.org> Date: Thu, 23 Sep 2004 16:27:15 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200409232112.i8NLCLgQ065917@repoman.freebsd.org> <20040923224739.GE959@green.homeunix.org> <41535A06.7090809@root.org> <200409231923.40285.jhb@FreeBSD.org> In-Reply-To: <200409231923.40285.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Brian Fundakowski Feldman cc: src-committers@FreeBSD.org cc: cvs-src@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Joerg Wunsch Subject: Re: cvs commit: src/sys/dev/fdc fdc.c fdcvar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 23:27:17 -0000 John Baldwin wrote: > On Thursday 23 September 2004 07:19 pm, Nate Lawson wrote: >>Or simpler: >> >>foo_kill(): >> error = kthread_suspend(p, kproc_shutdown_wait * hz); >> if (error == EWOULDBLOCK) >> printf("timed out\n"); >> >>foo_thread(): >> for (;;) { >> mtx_unlock(&bdlock); >> kthread_suspend_check(bufdaemonproc); >> ... >> mtx_lock(&bdlock); >> if (numdirtybuffers <= lodirtybuffers) >> msleep(&bd_request, &bdlock, PVM, "psleep", hz); > > > That doesn't actually cause the thread to exit, it just goes to sleep. If fdc > wants to support detaching and kldunload it needs the thread to actually go > away, not just go to sleep. If a thread is suspended and the module is unloaded, what would be the failure case? -- Nate