diff options
author | attilio <attilio@FreeBSD.org> | 2007-07-11 18:51:31 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2007-07-11 18:51:31 +0000 |
commit | fd15c387c1c78f416fa5254fd774250997ef4c45 (patch) | |
tree | 63008dc0b55f7092df10b1d58fc49325d619c035 | |
parent | 257b90801da4be0806d47875c6255363b191f9cb (diff) | |
download | FreeBSD-src-fd15c387c1c78f416fa5254fd774250997ef4c45.zip FreeBSD-src-fd15c387c1c78f416fa5254fd774250997ef4c45.tar.gz |
Fix userland applications compilation by using correct KPI protection
macros for lock_profiling.
Reported by: Tom McLaughlin <tmclaugh@sdf.lonestar.org>
Tested by: Tom McLaughlin <tmclaugh@sdf.lonestar.org>
Approved by: jeff (mentor)
Approved by: re
-rw-r--r-- | sys/sys/lock_profile.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/lock_profile.h b/sys/sys/lock_profile.h index 18c21b7..c39ece6 100644 --- a/sys/sys/lock_profile.h +++ b/sys/sys/lock_profile.h @@ -72,6 +72,7 @@ extern struct lock_prof lprof_buf[LPROF_HASH_SIZE]; #define LPROF_LOCK(hash) mtx_lock_spin(&lprof_locks[LPROF_LHASH(hash)]) #define LPROF_UNLOCK(hash) mtx_unlock_spin(&lprof_locks[LPROF_LHASH(hash)]) +#ifdef _KERNEL extern struct mtx lprof_locks[LPROF_LOCK_SIZE]; extern int lock_prof_enable; @@ -145,7 +146,11 @@ static inline void lock_profile_release_lock(struct lock_object *lo) _lock_profile_release_lock(lo); } +#endif /* _KERNEL */ + #else /* !LOCK_PROFILING */ + +#ifdef _KERNEL static inline void lock_profile_update_wait(struct lock_object *lo, uint64_t waitstart) {;} static inline void lock_profile_update_contest_locking(struct lock_object *lo, int contested) {;} static inline void lock_profile_release_lock(struct lock_object *lo) {;} @@ -155,6 +160,8 @@ static inline void lock_profile_obtain_lock_success(struct lock_object *lo, int static inline void lock_profile_object_destroy(struct lock_object *lo) {;} static inline void lock_profile_object_init(struct lock_object *lo, struct lock_class *class, const char *name) {;} +#endif /* _KERNEL */ + #endif /* !LOCK_PROFILING */ #endif /* _SYS_LOCK_PROFILE_H_ */ |