From owner-freebsd-geom@FreeBSD.ORG Sun Jan 25 15:47:56 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 C62E416A4CE for ; Sun, 25 Jan 2004 15:47:56 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A465143D1F for ; Sun, 25 Jan 2004 15:47:55 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 70D1D3ABB53; Mon, 26 Jan 2004 00:48:48 +0100 (CET) Date: Mon, 26 Jan 2004 00:48:48 +0100 From: Pawel Jakub Dawidek To: freebsd-geom@freebsd.org Message-ID: <20040125234848.GH565@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="doKZ0ri6bHmN2Q5y" Content-Disposition: inline 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 Subject: 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: Sun, 25 Jan 2004 23:47:56 -0000 --doKZ0ri6bHmN2Q5y Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. 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 thread. http://garage.freebsd.pl/patches/geom_event_deadlock.patch --=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 --doKZ0ri6bHmN2Q5y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBQBRV4D/PhmMH/Mf1AQEPCwQAmNn8FXRrIyT1HtCOpwQdz28i4MTGCKIN FLDR7YzEAiqYa9SMBpsmqbUL9N8RYtES0SzkhyEfVdAgCtYF1Ij8fwCqxLhJ4PGJ dOgf7EjWZalgQpHcwXVaQ2F6fcs6jFRpLsQrK6qZCJMh+dBEiQAWjEK2E7dsUaPq aLgwq1le3F8= =y0S+ -----END PGP SIGNATURE----- --doKZ0ri6bHmN2Q5y--