mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Add USEC_SLEEP macro support. Change the location at which we define
ISP_LOCK/ISP_UNLOCK macros.
This commit is contained in:
parent
5f7f65f124
commit
e5f2f488c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69525
@ -119,6 +119,19 @@ struct isposinfo {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
* Required Macros/Defines
|
||||||
*/
|
*/
|
||||||
@ -133,6 +146,10 @@ struct isposinfo {
|
|||||||
#define SNPRINTF snprintf
|
#define SNPRINTF snprintf
|
||||||
#define STRNCAT strncat
|
#define STRNCAT strncat
|
||||||
#define USEC_DELAY DELAY
|
#define USEC_DELAY DELAY
|
||||||
|
#define USEC_SLEEP(isp, x) \
|
||||||
|
ISP_UNLOCK(isp); \
|
||||||
|
DELAY(x); \
|
||||||
|
ISP_LOCK(isp)
|
||||||
|
|
||||||
#define NANOTIME_T struct timespec
|
#define NANOTIME_T struct timespec
|
||||||
#define GET_NANOTIME nanotime
|
#define GET_NANOTIME nanotime
|
||||||
@ -274,18 +291,6 @@ struct isposinfo {
|
|||||||
extern void isp_attach(struct ispsoftc *);
|
extern void isp_attach(struct ispsoftc *);
|
||||||
extern void isp_uninit(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
|
* Platform private flags
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user