summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-12-02 18:33:29 +0000
committermjacob <mjacob@FreeBSD.org>2000-12-02 18:33:29 +0000
commitb60dc7dc10282b413955e91ef34b45d89861e2b0 (patch)
treef26cf3d15f20fcf997160621d55fdf3f934f85c5 /sys/dev/isp
parent14f55e3a6c89a035a91fd7bac35f408377407234 (diff)
downloadFreeBSD-src-b60dc7dc10282b413955e91ef34b45d89861e2b0.zip
FreeBSD-src-b60dc7dc10282b413955e91ef34b45d89861e2b0.tar.gz
Add USEC_SLEEP macro support. Change the location at which we define
ISP_LOCK/ISP_UNLOCK macros.
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/isp_freebsd.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index ef58ce7..3425460 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -120,6 +120,19 @@ struct isposinfo {
};
/*
+ * Locking macros...
+ */
+
+#ifdef ISP_SMPLOCK
+#define ISP_LOCK(x) mtx_enter(&(x)->isp_osinfo.lock, MTX_DEF)
+#define ISP_UNLOCK(x) mtx_exit(&(x)->isp_osinfo.lock, MTX_DEF)
+#else
+#define ISP_LOCK isp_lock
+#define ISP_UNLOCK isp_unlock
+#endif
+
+
+/*
* Required Macros/Defines
*/
@@ -133,6 +146,10 @@ struct isposinfo {
#define SNPRINTF snprintf
#define STRNCAT strncat
#define USEC_DELAY DELAY
+#define USEC_SLEEP(isp, x) \
+ ISP_UNLOCK(isp); \
+ DELAY(x); \
+ ISP_LOCK(isp)
#define NANOTIME_T struct timespec
#define GET_NANOTIME nanotime
@@ -275,18 +292,6 @@ extern void isp_attach(struct ispsoftc *);
extern void isp_uninit(struct ispsoftc *);
/*
- * Locking macros...
- */
-
-#ifdef ISP_SMPLOCK
-#define ISP_LOCK(x) mtx_enter(&(x)->isp_osinfo.lock, MTX_DEF)
-#define ISP_UNLOCK(x) mtx_exit(&(x)->isp_osinfo.lock, MTX_DEF)
-#else
-#define ISP_LOCK isp_lock
-#define ISP_UNLOCK isp_unlock
-#endif
-
-/*
* Platform private flags
*/
#define ISP_SPRIV_ERRSET 0x1
OpenPOWER on IntegriCloud