diff options
author | jhb <jhb@FreeBSD.org> | 2007-03-21 21:20:51 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-03-21 21:20:51 +0000 |
commit | a84f74bb36d0c3edb2676543f0a1da4e07912da8 (patch) | |
tree | 3b7e93e92bb0a2a4559d2d242f9c069564849c03 /sys/sys/mutex.h | |
parent | 4b65fa3cdb272192c39a0e5cf223f9fe71dff949 (diff) | |
download | FreeBSD-src-a84f74bb36d0c3edb2676543f0a1da4e07912da8.zip FreeBSD-src-a84f74bb36d0c3edb2676543f0a1da4e07912da8.tar.gz |
Rename the 'mtx_object', 'rw_object', and 'sx_object' members of mutexes,
rwlocks, and sx locks to 'lock_object'.
Diffstat (limited to 'sys/sys/mutex.h')
-rw-r--r-- | sys/sys/mutex.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index a8d349f..6d16ff0 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -159,11 +159,11 @@ void _mtx_assert(struct mtx *m, int what, const char *file, int line); int contested = 0; \ uint64_t waittime = 0; \ if (!_obtain_lock((mp), _tid)) { \ - lock_profile_obtain_lock_failed(&(mp)->mtx_object, \ + lock_profile_obtain_lock_failed(&(mp)->lock_object, \ &contested, &waittime); \ _mtx_lock_sleep((mp), _tid, (opts), (file), (line)); \ } \ - lock_profile_obtain_lock_success(&(mp)->mtx_object, contested, \ + lock_profile_obtain_lock_success(&(mp)->lock_object, contested, \ waittime, (file), (line)); \ } while (0) #endif @@ -186,12 +186,12 @@ void _mtx_assert(struct mtx *m, int what, const char *file, int line); if ((mp)->mtx_lock == _tid) \ (mp)->mtx_recurse++; \ else { \ - lock_profile_obtain_lock_failed(&(mp)->mtx_object, \ + lock_profile_obtain_lock_failed(&(mp)->lock_object, \ &contested, &waittime); \ _mtx_lock_spin((mp), _tid, (opts), (file), (line)); \ } \ } \ - lock_profile_obtain_lock_success(&(mp)->mtx_object, contested, \ + lock_profile_obtain_lock_success(&(mp)->lock_object, contested, \ waittime, (file), (line)); \ } while (0) #else /* SMP */ @@ -340,15 +340,15 @@ extern struct mtx_pool *mtxpool_sleep; _mtx_trylock((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_sleep(chan, mtx, pri, wmesg, timo) \ - _sleep((chan), &(mtx)->mtx_object, (pri), (wmesg), (timo)) + _sleep((chan), &(mtx)->lock_object, (pri), (wmesg), (timo)) -#define mtx_initialized(m) lock_initalized(&(m)->mtx_object) +#define mtx_initialized(m) lock_initalized(&(m)->lock_object) #define mtx_owned(m) (((m)->mtx_lock & ~MTX_FLAGMASK) == (uintptr_t)curthread) #define mtx_recursed(m) ((m)->mtx_recurse != 0) -#define mtx_name(m) ((m)->mtx_object.lo_name) +#define mtx_name(m) ((m)->lock_object.lo_name) /* * Global locks. @@ -370,7 +370,7 @@ do { \ WITNESS_SAVE_DECL(Giant); \ \ if (mtx_owned(&Giant)) \ - WITNESS_SAVE(&Giant.mtx_object, Giant); \ + WITNESS_SAVE(&Giant.lock_object, Giant); \ for (_giantcnt = 0; mtx_owned(&Giant); _giantcnt++) \ mtx_unlock(&Giant) @@ -379,7 +379,7 @@ do { \ while (_giantcnt--) \ mtx_lock(&Giant); \ if (mtx_owned(&Giant)) \ - WITNESS_RESTORE(&Giant.mtx_object, Giant); \ + WITNESS_RESTORE(&Giant.lock_object, Giant); \ } while (0) #define PARTIAL_PICKUP_GIANT() \ @@ -387,7 +387,7 @@ do { \ while (_giantcnt--) \ mtx_lock(&Giant); \ if (mtx_owned(&Giant)) \ - WITNESS_RESTORE(&Giant.mtx_object, Giant) + WITNESS_RESTORE(&Giant.lock_object, Giant) #endif /* |