aboutsummaryrefslogtreecommitdiff
path: root/src/sync.h
AgeCommit message (Collapse)Author
2015-06-16locking: teach Clang's -Wthread-safety to cope with our scoped lock macrosCory Fields
This allows us to use function/variable/class attributes to specify locking requisites, allowing problems to be detected during static analysis. This works perfectly with newer Clang versions (tested with 3.3-3.7). For older versions (tested 3.2), it compiles fine but spews lots of false-positives.
2015-04-20[Trivial] format sync.hPhilip Kaufmann
2015-01-28Removed main.h dependency from rpcserver.cppEric Lombrozo
Rebased by @laanwj: - update for RPC methods added since 84d13ee: setmocktime, invalidateblock, reconsiderblock. Only the first, setmocktime, required a change, the other two are thread safe.
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-16Remove references to X11 licenceMichael Ford
2014-09-19Apply clang-format on some infrequently-updated filesPieter Wuille
2014-08-28add missing header end commentsPhilip Kaufmann
- ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
2014-07-11getblocktemplate: longpolling supportLuke Dashjr
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