aboutsummaryrefslogtreecommitdiff
path: root/src/sync.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* qa: Initialize lockstack to prevent null pointer derefMarcoFalke2018-05-221-11/+8
|
* break circular dependency: random/sync -> util -> random/syncChun Kuan Lee2018-05-171-3/+5
|
* [logging] Comment all continuing logs.John Newbery2018-04-071-4/+4
| | | | | | | Most logs should terminated with a '\n'. Some logs are built up over multiple calls to logPrintf(), so do not need a newline terminater. Comment all of these 'continued' logs as a linter hing.
* Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan2018-04-051-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr) Pull request description: Not sure why all these includes were missing, but it's breaking builds for some users: https://bugs.gentoo.org/show_bug.cgi?id=652142 (Added to all files with a reference to `std::unique_ptr`) Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
| * Bugfix: Include <memory> for std::unique_ptrLuke Dashjr2018-04-021-0/+1
| |
* | Fix typospracticalswift2018-01-281-2/+2
|/
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* threads: add a thread_local autoconf checkCory Fields2017-11-271-0/+3
|
* Switched sync.{cpp,h} to std threading primitives.Thomas Snider2017-11-181-9/+8
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Add ability to assert a lock is not held in DEBUG_LOCKORDERMatt Corallo2017-10-131-0/+10
|
* Remove unused fTry from push_lockJoão Barbosa2017-09-301-2/+2
|
* Use nullptr instead of zero (0) as the null pointer constantpracticalswift2017-08-161-1/+1
|
* scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-1/+1
| | | | | | | | | | | | | instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
* scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón2017-06-221-1/+0
| | | | | | -BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
* scripted-diff: Remove PAIRTYPEJorge Timón2017-06-051-5/+5
| | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ; -END VERIFY SCRIPT-
* scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-5/+5
| | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* Remove unused codepracticalswift2017-03-171-2/+0
|
* 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