Mercurial > octave
diff liboctave/util/oct-mutex.cc @ 27379:3db033e86376
use m_ prefix for data members in most liboctave/util classes
Files affected: cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h,
glob-match.cc, glob-match.h, kpse.cc, kpse.h, lo-array-errwarn.cc,
lo-array-errwarn.h, lo-regexp.cc, lo-regexp.h, oct-inttypes.h,
oct-mutex.cc, oct-mutex.h, oct-shlib.cc, oct-shlib.h, oct-sort.cc,
oct-sort.h, octave-preserve-stream-state.h, singleton-cleanup.cc, and
singleton-cleanup.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 09 Sep 2019 16:15:40 -0400 |
parents | 00f796120a6d |
children | b442ec6dda5c |
line wrap: on
line diff
--- a/liboctave/util/oct-mutex.cc Sat Sep 07 10:49:03 2019 -0400 +++ b/liboctave/util/oct-mutex.cc Mon Sep 09 16:15:40 2019 -0400 @@ -112,38 +112,38 @@ { public: pthread_mutex (void) - : base_mutex (), pm () + : base_mutex (), m_pm () { pthread_mutexattr_t attr; pthread_mutexattr_init (&attr); pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init (&pm, &attr); + pthread_mutex_init (&m_pm, &attr); pthread_mutexattr_destroy (&attr); } ~pthread_mutex (void) { - pthread_mutex_destroy (&pm); + pthread_mutex_destroy (&m_pm); } void lock (void) { - pthread_mutex_lock (&pm); + pthread_mutex_lock (&m_pm); } void unlock (void) { - pthread_mutex_unlock (&pm); + pthread_mutex_unlock (&m_pm); } bool try_lock (void) { - return (pthread_mutex_trylock (&pm) == 0); + return (pthread_mutex_trylock (&m_pm) == 0); } private: - pthread_mutex_t pm; + pthread_mutex_t m_pm; }; static pthread_t thread_id = 0; @@ -174,5 +174,5 @@ #endif } - mutex::mutex (void) : rep (init_rep ()) { } + mutex::mutex (void) : m_rep (init_rep ()) { } }