diff options
-rw-r--r-- | sys/sys/mutex.h | 12 | ||||
-rw-r--r-- | sys/sys/rwlock.h | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index cec365b..cde6e44 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -159,10 +159,12 @@ 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, &contested, &waittime); \ + lock_profile_obtain_lock_failed(&(mp)->mtx_object, \ + &contested, &waittime); \ _mtx_lock_sleep((mp), _tid, (opts), (file), (line)); \ } \ - lock_profile_obtain_lock_success(&(mp)->mtx_object, contested, waittime, file, line); \ + lock_profile_obtain_lock_success(&(mp)->mtx_object, contested, \ + waittime, (file), (line)); \ } while (0) #endif @@ -184,11 +186,13 @@ 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, &contested, &waittime); \ + lock_profile_obtain_lock_failed(&(mp)->mtx_object, \ + &contested, &waittime); \ _mtx_lock_spin((mp), _tid, (opts), (file), (line)); \ } \ } \ - lock_profile_obtain_lock_success(&(mp)->mtx_object, contested, waittime, file, line); \ + lock_profile_obtain_lock_success(&(mp)->mtx_object, contested, \ + waittime, (file), (line)); \ } while (0) #else /* SMP */ #define _get_spin_lock(mp, tid, opts, file, line) do { \ diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h index 13a5436..c387e65 100644 --- a/sys/sys/rwlock.h +++ b/sys/sys/rwlock.h @@ -101,10 +101,12 @@ uint64_t waitstart = 0; \ \ if (!_rw_write_lock((rw), _tid)) { \ - lock_profile_obtain_lock_failed(&(rw)->rw_object, &contested, &waitstart); \ + lock_profile_obtain_lock_failed(&(rw)->rw_object, \ + &contested, &waitstart); \ _rw_wlock_hard((rw), _tid, (file), (line)); \ } \ - lock_profile_obtain_lock_success(&rw->rw_object, contested, waitstart, file, line); \ + lock_profile_obtain_lock_success(&(rw)->rw_object, contested, \ + waitstart, (file), (line)); \ } while (0) /* Release a write lock. */ |