From owner-freebsd-current@FreeBSD.ORG Wed Jul 21 17:06:34 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 F2FF316A4CE for ; Wed, 21 Jul 2004 17:06:33 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40E6543D54 for ; Wed, 21 Jul 2004 17:06:33 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i6LH6SaI011713 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Wed, 21 Jul 2004 19:06:31 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i6LH5bUi058045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 21 Jul 2004 19:05:37 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i6LH5a3T072822 for ; Wed, 21 Jul 2004 19:05:36 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i6LH5axd072821 for current@freebsd.org; Wed, 21 Jul 2004 19:05:36 +0200 (CEST) (envelope-from ticso) Date: Wed, 21 Jul 2004 19:05:36 +0200 From: Bernd Walter To: current@freebsd.org Message-ID: <20040721170534.GF70663@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.61 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on cicely5.cicely.de Subject: GIANT question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2004 17:06:34 -0000 Say I have a driver that could run without needing GIANT, but makes use of a subsystem that requires GIANT. Removing D_NEEDGIANT in cdevsw seems to be enough to get called from userland without GIANT held. Now I need to aquire GIANT bevor calling the subsystem and release it on return. What I've found so far is DROP_GIANT/PICKUP_GIANT, which has to be paired the other way. What is the prefered way to get/release GIANT in that case? -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de