From owner-freebsd-arch Fri Sep 27 9:30:14 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 209BF37B404; Fri, 27 Sep 2002 09:30:14 -0700 (PDT) Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.157.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3ACDD43E6E; Fri, 27 Sep 2002 09:30:13 -0700 (PDT) (envelope-from mark@grimreaper.grondar.org) Received: from storm.FreeBSD.org.uk (uucp@localhost [127.0.0.1]) by storm.FreeBSD.org.uk (8.12.5/8.12.5) with ESMTP id g8RGUCB0002563; Fri, 27 Sep 2002 17:30:12 +0100 (BST) (envelope-from mark@grimreaper.grondar.org) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.12.5/8.12.5/Submit) with UUCP id g8RGUCJD002562; Fri, 27 Sep 2002 17:30:12 +0100 (BST) Received: from grimreaper.grondar.org (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.6/8.12.5) with ESMTP id g8RGT0wf051750; Fri, 27 Sep 2002 17:29:00 +0100 (BST) (envelope-from mark@grimreaper.grondar.org) Message-Id: <200209271629.g8RGT0wf051750@grimreaper.grondar.org> To: John Baldwin Cc: arch@FreeBSD.org Subject: Re: [patch] module-with-thread exit routine. References: In-Reply-To: ; from John Baldwin "Fri, 27 Sep 2002 11:35:49 EDT." Date: Fri, 27 Sep 2002 17:29:00 +0100 From: Mark Murray Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Think of the cv as a wakeup to the kthread to tell it to go examine > 'event' and see that it needs to die. The trick here is you need to > make sure you don't miss the wakeup. Thus, you need to atomically > signal the thread to die and then block waiting for it to die. Aaaaah! That makes sense. Thanks! M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message