From owner-p4-projects@FreeBSD.ORG Mon Feb 5 22:38:38 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2DD9016A400; Mon, 5 Feb 2007 22:38:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10CDF16A409 for ; Mon, 5 Feb 2007 22:38:25 +0000 (UTC) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 0B44013C4AA for ; Mon, 5 Feb 2007 22:38:23 +0000 (UTC) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l15McM3h068493 for ; Mon, 5 Feb 2007 22:38:22 GMT (envelope-from scottl@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l15McMIY068490 for perforce@freebsd.org; Mon, 5 Feb 2007 22:38:22 GMT (envelope-from scottl@freebsd.org) Date: Mon, 5 Feb 2007 22:38:22 GMT Message-Id: <200702052238.l15McMIY068490@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to scottl@freebsd.org using -f From: Scott Long To: Perforce Change Reviews Cc: Subject: PERFORCE change 114077 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2007 22:38:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=114077 Change 114077 by scottl@scottl-x64 on 2007/02/05 22:37:57 Add locking stubs for ahc. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/aic7xxx/aic7xxx_osm.h#10 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/aic7xxx/aic7xxx_osm.h#10 (text+ko) ==== @@ -204,18 +204,19 @@ static __inline void ahc_lockinit(struct ahc_softc *ahc) { + mtx_init(&ahc->platform_data->mtx, "ahc_lock", NULL, MTX_DEF); } static __inline void ahc_lock(struct ahc_softc *ahc, unsigned long *flags) { - *flags = splcam(); + mtx_lock(&ahc->platform_data->mtx); } static __inline void ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) { - splx(*flags); + mtx_unlock(&ahc->platform_data->mtx); } /* Lock held during command compeletion to the upper layer */