PERFORCE change 171447 for review
Alexander Motin
mav at FreeBSD.org
Sun Dec 6 11:41:03 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=171447
Change 171447 by mav at mav_mavbook on 2009/12/06 11:40:06
Reduce diff to HEAD.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#22 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#22 (text+ko) ====
@@ -178,9 +178,23 @@
int cam_periph_error(union ccb *ccb, cam_flags camflags,
u_int32_t sense_flags, union ccb *save_ccb);
-#define cam_periph_lock(periph) mtx_lock((periph)->sim->mtx)
-#define cam_periph_unlock(periph) mtx_unlock((periph)->sim->mtx)
-#define cam_periph_owned(periph) mtx_owned((periph)->sim->mtx)
+static __inline void
+cam_periph_lock(struct cam_periph *periph)
+{
+ mtx_lock(periph->sim->mtx);
+}
+
+static __inline void
+cam_periph_unlock(struct cam_periph *periph)
+{
+ mtx_unlock(periph->sim->mtx);
+}
+
+static __inline int
+cam_periph_owned(struct cam_periph *periph)
+{
+ return (mtx_owned(periph->sim->mtx));
+}
#endif /* _KERNEL */
#endif /* _CAM_CAM_PERIPH_H */
More information about the p4-projects
mailing list