PERFORCE change 114077 for review

Scott Long scottl at FreeBSD.org
Mon Feb 5 22:38:39 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=114077

Change 114077 by scottl at 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 */


More information about the p4-projects mailing list