Date: Sun, 6 Dec 2009 11:41:02 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 171447 for review Message-ID: <200912061141.nB6Bf2wu097998@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171447 Change 171447 by mav@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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912061141.nB6Bf2wu097998>