aboutsummaryrefslogtreecommitdiff
path: root/src/sync.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Further-enforce lockordering by enforcing directly after TRY_LOCKsMatt Corallo2017-02-071-15/+13
|
* Always enforce lock strict lock ordering (try or not)Matt Corallo2017-02-021-25/+1
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Clean up lockorder data of destroyed mutexesPieter Wuille2016-04-101-11/+44
| | | | | | | | | | | | | | | The lockorder potential deadlock detection works by remembering for each lock A that is acquired while holding another B the pair (A,B), and triggering a warning when (B,A) already exists in the table. A and B in the above text are represented by pointers to the CCriticalSection object that is acquired. This does mean however that we need to clean up the table entries that refer to any critical section which is destroyed, as it memory address can potentially be used for another unrelated lock in the future. Implement this clean up by remembering not only the pairs in forward direction, but also backward direction. This allows for fast iteration over all pairs that use a deleted CCriticalSection in either the first or the second position.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Revert "Revert "Assert on probable deadlocks if the second lock isnt try_lock""Cory Fields2015-08-071-10/+39
| | | | | | This reverts commit a4fe57da6207c1e5691a1e843d22db571f3f0186. The issue here should be fixed by the previous commit.
* Revert "Assert on probable deadlocks if the second lock isnt try_lock"Wladimir J. van der Laan2015-08-061-39/+10
| | | | | | | Disabling this for now - too many intermittent Travis issues. This reverts commit 0fcc4e1e04082daf6e97e05bfb26e4b94e54ea53 (pull #5515).
* Assert on probable deadlocks if the second lock isnt try_lockMatt Corallo2015-07-221-10/+39
|
* Remove broken+useless lock/unlock log printsMatt Corallo2015-04-241-5/+0
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Apply clang-format on some infrequently-updated filesPieter Wuille2014-09-191-24/+24
|
* header include cleanupPhilip Kaufmann2014-09-141-1/+2
| | | | - ensures alphabetical ordering for includes etc. in source file headers
* Fix build with DEBUG_LOCKORDERWladimir J. van der Laan2014-08-281-0/+3
| | | | Fixes #4771
* Wallet locking fixes for -DDEBUG_LOCKORDERGavin Andresen2014-02-181-2/+3
| | | | | | | | | | | Compiling with -DDEBUG_LOCKORDER and running the qa/rpc-test/ regression tests uncovered a couple of wallet methods that should (but didn't) acquire the cs_wallet mutext. I also changed the AssertLockHeld() routine print to stderr and abort, instead of printing to debug.log and then assert()'ing. It is annoying to look in debug.log to find out which AssertLockHeld is failing.
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-5/+5
| | | | | | | After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
* Use mutex pointer instead of name for AssertLockHeldWladimir J. van der Laan2013-12-191-3/+3
| | | | | This makes it useable for non-global locks such as the wallet and keystore locks.
* mutex debugging routines: LocksHeld() and AssertLockHeld()Gavin Andresen2013-11-291-0/+18
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-0/+1
| | | | | | | | | 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.
* Make -DDEBUGLOCKORDER + -debug less noisyGavin Andresen2013-10-201-2/+2
| | | | | Print out every mutex lock/unlock if compiled -DDEBUGLOCKORDER only if -debug=lock is set.
* Replace printf with LogPrintf / LogPrintGavin Andresen2013-09-181-13/+13
|
* Trim trailing whitespace for src/*.{h,cpp}Jeff Garzik2012-09-181-1/+1
|
* Fix a few typosfanquake2012-06-291-1/+1
|
* Fix DEBUG_LOCKCONTENTIONMatt Corallo2012-06-051-0/+8
|
* Merge pull request #1354 from fanquake/masterPieter Wuille2012-05-201-1/+1
|\ | | | | Update Header Licenses
| * Update License in File HeadersFordy2012-05-181-1/+1
| | | | | | | | | | | | 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.
* | Use boost::thread locking instead of interprocessPieter Wuille2012-05-181-17/+18
|/
* Split synchronization mechanisms from util.{h,cpp}Pieter Wuille2012-05-111-0/+119