From owner-freebsd-geom@FreeBSD.ORG Mon Jan 26 08:12:10 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9387416A4CE for ; Mon, 26 Jan 2004 08:12:10 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E69143D5E for ; Mon, 26 Jan 2004 08:12:02 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id C9B903ABB51; Mon, 26 Jan 2004 17:13:00 +0100 (CET) Date: Mon, 26 Jan 2004 17:13:00 +0100 From: Pawel Jakub Dawidek To: Lukas Ertl Message-ID: <20040126161300.GJ565@garage.freebsd.pl> References: <20040125234848.GH565@garage.freebsd.pl> <20040126164924.C90355@pcle2.cc.univie.ac.at> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="J+eNKFoVC4T1DV3f" Content-Disposition: inline In-Reply-To: <20040126164924.C90355@pcle2.cc.univie.ac.at> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE-p13 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-geom@freebsd.org Subject: Re: Preventing deadlocks on the event queue. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 16:12:10 -0000 --J+eNKFoVC4T1DV3f Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2004 at 04:50:38PM +0100, Lukas Ertl wrote: +> > So, I think I've found clever way to prevents deadlock caused by +> > calling g_waitfor_event() from an event. +> > +> > My idea is to check if curthread in g_waitfor_event() is a g_event thr= ead. +> > +> > http://garage.freebsd.pl/patches/geom_event_deadlock.patch +>=20 +> Do you really want to make this a separate function? Since it's just a +> one-line comparison, wouldn't a macro suffice? I want to avoid exporting 'g_event_proc' from geom_kern.c (it is declareted staticaly there). --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --J+eNKFoVC4T1DV3f Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBQBU8jD/PhmMH/Mf1AQEOjwQAiCGlv4I//+SCIlo4E/2UR9x01qEIJLU0 Z6gDU0dj6OJImVCdj3mih3/0C9KWaeQCRx/BrU9rkxZ0Ji9dcsIb5moP/oxMifwr +F/lBc57rZQdiD/iOOzz3e3hzNgjRAWgwSQ2Vdi4fNpZklZjFNKMtAe6B9DTnnEE o6aBr0LllAM= =Yah5 -----END PGP SIGNATURE----- --J+eNKFoVC4T1DV3f--