aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2002-09-03 02:18:21 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2002-09-03 02:18:21 +0000
commit530d743a2f17cd3ee7098e1e6422950ad74c263d (patch)
treed136ccd80cec436342a04afc4651830e7e13c611 /sys
parentf0c6c306f91a839c0ad2e84a3e1b84aa81b26c8f (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/mpt/mpt_freebsd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/mpt/mpt_freebsd.h b/sys/dev/mpt/mpt_freebsd.h
index aa3814707c5e6..84527bf7ba8cc 100644
--- a/sys/dev/mpt/mpt_freebsd.h
+++ b/sys/dev/mpt/mpt_freebsd.h
@@ -91,6 +91,7 @@
#define MPT_LOCK_SETUP(mpt)
#define MPT_LOCK_DESTROY(mpt)
#else
+#if LOCKING_WORKED_AS_IT_SHOULD
#define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE
#define MPT_LOCK_SETUP(mpt) \
mtx_init(&mpt->mpt_lock, "mpt", NULL, MTX_DEF); \
@@ -107,6 +108,15 @@
mtx_unlock(&(mpt)->mpt_lock); mtx_lock(&Giant)
#define CAMLOCK_2_MPTLOCK(mpt) \
mtx_unlock(&Giant); mtx_lock(&(mpt)->mpt_lock)
+#else
+#define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY
+#define MPT_LOCK_SETUP(mpt) do { } while (0)
+#define MPT_LOCK_DESTROY(mpt) do { } while (0)
+#define MPT_LOCK(mpt) do { } while (0)
+#define MPT_UNLOCK(mpt) do { } while (0)
+#define MPTLOCK_2_CAMLOCK(mpt) do { } while (0)
+#define CAMLOCK_2_MPTLOCK(mpt) do { } while (0)
+#endif
#endif