svn commit: r254216 - projects/camlock/sys/cam

Alexander Motin mav at FreeBSD.org
Sun Aug 11 11:33:49 UTC 2013


Author: mav
Date: Sun Aug 11 11:33:48 2013
New Revision: 254216
URL: http://svnweb.freebsd.org/changeset/base/254216

Log:
  Fix r254214 build without INVARIANTS.

Modified:
  projects/camlock/sys/cam/cam_periph.h
  projects/camlock/sys/cam/cam_xpt.c
  projects/camlock/sys/cam/cam_xpt.h

Modified: projects/camlock/sys/cam/cam_periph.h
==============================================================================
--- projects/camlock/sys/cam/cam_periph.h	Sun Aug 11 11:06:49 2013	(r254215)
+++ projects/camlock/sys/cam/cam_periph.h	Sun Aug 11 11:33:48 2013	(r254216)
@@ -204,11 +204,8 @@ cam_periph_owned(struct cam_periph *peri
 	return (xpt_path_owned(periph->path));
 }
 
-static __inline void
-cam_periph_assert(struct cam_periph *periph, int what)
-{
-	mtx_assert(xpt_path_mtx(periph->path), what);
-}
+#define cam_periph_assert(periph, what)					\
+	mtx_assert(xpt_path_mtx((periph)->path), (what))
 
 static __inline int
 cam_periph_sleep(struct cam_periph *periph, void *chan, int priority,

Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c	Sun Aug 11 11:06:49 2013	(r254215)
+++ projects/camlock/sys/cam/cam_xpt.c	Sun Aug 11 11:33:48 2013	(r254216)
@@ -4435,7 +4435,7 @@ xpt_alloc_target(struct cam_eb *bus, tar
 {
 	struct cam_et *cur_target, *target;
 
-	xpt_assert_buses(MA_OWNED);
+	mtx_assert(&xsoftc.xpt_topo_lock, MA_OWNED);
 	mtx_assert(&bus->eb_mtx, MA_OWNED);
 	target = (struct cam_et *)malloc(sizeof(*target), M_CAMXPT,
 					 M_NOWAIT|M_ZERO);
@@ -4990,12 +4990,6 @@ xpt_unlock_buses(void)
 }
 
 void
-xpt_assert_buses(int what)
-{
-	mtx_assert(&xsoftc.xpt_topo_lock, what);
-}
-
-void
 xpt_path_lock(struct cam_path *path)
 {
 
@@ -5009,13 +5003,6 @@ xpt_path_unlock(struct cam_path *path)
 	mtx_unlock(&path->device->device_mtx);
 }
 
-void
-xpt_path_assert(struct cam_path *path, int what)
-{
-
-	mtx_assert(&path->device->device_mtx, what);
-}
-
 int
 xpt_path_owned(struct cam_path *path)
 {

Modified: projects/camlock/sys/cam/cam_xpt.h
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.h	Sun Aug 11 11:06:49 2013	(r254215)
+++ projects/camlock/sys/cam/cam_xpt.h	Sun Aug 11 11:33:48 2013	(r254216)
@@ -102,10 +102,9 @@ void			xpt_hold_boot(void);
 void			xpt_release_boot(void);
 void			xpt_lock_buses(void);
 void			xpt_unlock_buses(void);
-void			xpt_assert_buses(int what);
 void			xpt_path_lock(struct cam_path *path);
 void			xpt_path_unlock(struct cam_path *path);
-void			xpt_path_assert(struct cam_path *path, int what);
+#define xpt_path_assert(path, what)	mtx_assert(xpt_path_mtx(path), (what))
 int			xpt_path_owned(struct cam_path *path);
 int			xpt_path_sleep(struct cam_path *path, void *chan,
 				       int priority, const char *wmesg,


More information about the svn-src-projects mailing list