Commit Graph
13 Commits
Author SHA1 Message Date
Alexander Kjeldaas bfc9620799 Simplify CMutexLock
o Remove unused Leave and GetLock functions
o Make Enter and TryEnter private.
o Simplify Enter and TryEnter.
  boost::unique_lock doesn't really know whether the
  mutex it wraps is locked or not when the defer_lock
  option is used.
  The boost::recursive_mutex does not expose this
  information, so unique_lock only infers this
  knowledge.  When taking the lock is defered, it
  (randomly) assumes that the lock is not taken.
  boost::unique_lock has the following definition:

        unique_lock(Mutex& m_,defer_lock_t):
            m(&m_),is_locked(false)
        {}

        bool owns_lock() const
        {
            return is_locked;
        }
  Thus it is a mistake to check owns_lock() in Enter
  and TryEnter - they will always return false.
2012-11-14 00:00:23 -03:00
Alexander Kjeldaas 25511af4a5 o Annotated lock-like functions in net.h.
o Removed unused function EndMessageAbortIfEmpty
2012-11-11 00:55:48 -03:00
Alexander Kjeldaas 05f97d1263 o Added AnnotatedMixin which adds locking annotations to the mutex
API, compatible with clang's -Wthread-safety
2012-11-11 00:55:48 -03:00
Alexander Kjeldaas c043ff79e3 o Added threadsafety.h - a set of macros using the -Wthread-safety
feature in clang.  These macros should primarily be used to
  document which locks protect a given piece of data.  Secondary it
  can be used to document the set of held and excluded locks when
  entering a function.
2012-11-11 00:53:00 -03:00
Alexander Kjeldaas 40c5e409e1 o Removed verbose clang warning 2012-11-11 00:25:19 -03:00
Alex 39ad0aa692 Fixed 100% CPU utilization problem on FreeBSD 9 2012-10-22 08:37:17 -04:00
Alex 17bfb1f437 Fixed compile error on FreeBSD 9.
See http://code.google.com/p/leveldb/issues/detail?id=98
2012-10-22 01:46:31 -04:00
Alex B e92e97f1ee Small fixes in both spanish translations 2011-11-24 12:32:19 +01:00
Alex B 53f21f6ee7 Added Spanish translation for qt 2011-10-09 23:54:07 +02:00
Alex Waters 13945b2a61 Updated readme file with timers. 2011-09-26 22:22:19 -04:00
Alex B b4af75c07f Spanish translation update 2011-09-11 22:08:43 +02:00
Alex B 905cbf0bf8 Romanian translation added 2011-09-06 20:41:33 +02:00
Alex Waters adb8a55b46 Updated readme file 2011-09-05 21:16:46 -04:00