From owner-cvs-src@FreeBSD.ORG Sat Feb 28 11:42:49 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BBEB16A4D6; Sat, 28 Feb 2004 11:42:49 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E30D43D1D; Sat, 28 Feb 2004 11:42:49 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1SJgnGe010751; Sat, 28 Feb 2004 11:42:49 -0800 (PST) (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1SJgnjc010750; Sat, 28 Feb 2004 11:42:49 -0800 (PST) (envelope-from truckman) Message-Id: <200402281942.i1SJgnjc010750@repoman.freebsd.org> From: Don Lewis Date: Sat, 28 Feb 2004 11:42:49 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/sound/pcm dsp.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2004 19:42:49 -0000 truckman 2004/02/28 11:42:49 PST FreeBSD src repository Modified files: sys/dev/sound/pcm dsp.c Log: Lock channels only as necessary in dsp_ioctl(), and only lock one channel at a time unless it is actually necessary to lock both. This avoids problems with lock order reversal and malloc() calls with a mutex held when lower level code unlocks a channel, calls malloc(), and relocks the channel. This also avoids the cost of some unnecessary locking and unlocking. Tested by: matk Revision Changes Path 1.74 +173 -65 src/sys/dev/sound/pcm/dsp.c