diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-02-02 21:31:34 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-02-02 21:31:34 +0000 |
commit | e92441a62f29aaeab7aea6b98a836237046cf0c6 (patch) | |
tree | 52e570d14870a49bb56aecb56e5d225ddcdfac8e /sys/dev/isp/isp_freebsd.h | |
parent | 78068dc67b21c89bf1d135f9f6ce32745a14d5e7 (diff) | |
download | FreeBSD-src-e92441a62f29aaeab7aea6b98a836237046cf0c6.zip FreeBSD-src-e92441a62f29aaeab7aea6b98a836237046cf0c6.tar.gz |
Remove use of inlines and use the functions as a library.
Larger code space, possibly performance hit, but more portable.
Certainly less questionable use of inlining.
Suggested by: des
Diffstat (limited to 'sys/dev/isp/isp_freebsd.h')
-rw-r--r-- | sys/dev/isp/isp_freebsd.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h index 8497c2b..bc9d218 100644 --- a/sys/dev/isp/isp_freebsd.h +++ b/sys/dev/isp/isp_freebsd.h @@ -74,13 +74,6 @@ #define ISP_SBUS_SUPPORTED 0 #endif -/* - * Hackery- remove TARGET MODE when compiling as a module on sparc64 - */ -#if defined(__sparc64__) && defined(KLD_MODULE) && defined(ISP_TARGET_MODE) -#undef ISP_TARGET_MODE -#endif - #define HANDLE_LOOPSTATE_IN_OUTER_LAYERS 1 /* #define ISP_SMPLOCK 1 */ @@ -189,8 +182,6 @@ struct isposinfo { * Required Macros/Defines */ -#define INLINE __inline - #define ISP2100_SCRLEN 0x800 #define MEMZERO bzero @@ -414,12 +405,13 @@ extern int isp_announced; #define XS_CMD_DONE_P(sccb) ((sccb)->ccb_h.spriv_field0 & ISP_SPRIV_DONE) #define XS_CMD_S_CLEAR(sccb) (sccb)->ccb_h.spriv_field0 = 0 + /* * Platform specific inline functions */ -static INLINE void isp_mbox_wait_complete(struct ispsoftc *); -static INLINE void +static __inline void isp_mbox_wait_complete(struct ispsoftc *); +static __inline void isp_mbox_wait_complete(struct ispsoftc *isp) { if (isp->isp_osinfo.intsok) { @@ -463,8 +455,8 @@ isp_mbox_wait_complete(struct ispsoftc *isp) } } -static INLINE u_int64_t nanotime_sub(struct timespec *, struct timespec *); -static INLINE u_int64_t +static __inline u_int64_t nanotime_sub(struct timespec *, struct timespec *); +static __inline u_int64_t nanotime_sub(struct timespec *b, struct timespec *a) { u_int64_t elapsed; @@ -476,8 +468,8 @@ nanotime_sub(struct timespec *b, struct timespec *a) return (elapsed); } -static INLINE char *strncat(char *, const char *, size_t); -static INLINE char * +static __inline char *strncat(char *, const char *, size_t); +static __inline char * strncat(char *d, const char *s, size_t c) { char *t = d; @@ -496,8 +488,9 @@ strncat(char *d, const char *s, size_t c) } /* - * Common inline functions + * ISP Library functions */ -#include <dev/isp/isp_inline.h> +#include <dev/isp/isp_library.h> + #endif /* _ISP_FREEBSD_H */ |