summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_periph.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-12-06 11:48:53 +0000
committermav <mav@FreeBSD.org>2009-12-06 11:48:53 +0000
commit3b25356a7f2fbaed46baab9878a76f64fb46aa41 (patch)
tree22687d4a4a7e84b87046c466907100e1e59e7ee8 /sys/cam/cam_periph.h
parent38d83668450370995d6ddef15aeaa9f87641e60d (diff)
downloadFreeBSD-src-3b25356a7f2fbaed46baab9878a76f64fb46aa41.zip
FreeBSD-src-3b25356a7f2fbaed46baab9878a76f64fb46aa41.tar.gz
MFp4:
If we panicked with SIM lock held, do not try to flush caches. Extra lock recursing will not make debugging easier.
Diffstat (limited to 'sys/cam/cam_periph.h')
-rw-r--r--sys/cam/cam_periph.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h
index 07caf52..e207b19 100644
--- a/sys/cam/cam_periph.h
+++ b/sys/cam/cam_periph.h
@@ -190,5 +190,11 @@ 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 */
OpenPOWER on IntegriCloud