aboutsummaryrefslogtreecommitdiff
path: root/src/sync.h
AgeCommit message (Collapse)Author
2013-12-19Use mutex pointer instead of name for AssertLockHeldWladimir J. van der Laan
This makes it useable for non-global locks such as the wallet and keystore locks.
2013-11-29mutex debugging routines: LocksHeld() and AssertLockHeld()Gavin Andresen
2013-11-10Cleanup code using forward declarations.Brandon Dahler
Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
2013-10-20Bump Year Number to 2013super3
2013-06-25Added comments to sync.h to make it easier to understand the macrosEric Lombrozo
2012-12-12Merge pull request #2003 from alexanderkjeldaas/documented-locking-part-2Gavin Andresen
Documented locking part 1+2
2012-11-14Simplify CMutexLockAlexander Kjeldaas
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-11o Added AnnotatedMixin which adds locking annotations to the mutexAlexander Kjeldaas
API, compatible with clang's -Wthread-safety
2012-09-25Update comment, we're no longer using boost::interprocess::scoped_lockWladimir J. van der Laan
2012-06-05Fix DEBUG_LOCKCONTENTIONMatt Corallo
2012-05-20Merge pull request #1354 from fanquake/masterPieter Wuille
Update Header Licenses
2012-05-18Use boost::thread locking instead of interprocessPieter Wuille
2012-05-18Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-11Split synchronization mechanisms from util.{h,cpp}Pieter Wuille