aboutsummaryrefslogtreecommitdiff
path: root/src/sync.cpp
AgeCommit message (Collapse)Author
2018-04-07[logging] Comment all continuing logs.John Newbery
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.
2018-04-05Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan
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
2018-04-02Bugfix: Include <memory> for std::unique_ptrLuke Dashjr
2018-01-28Fix typospracticalswift
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-27threads: add a thread_local autoconf checkCory Fields
2017-11-18Switched sync.{cpp,h} to std threading primitives.Thomas Snider
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-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-
2017-10-13Add ability to assert a lock is not held in DEBUG_LOCKORDERMatt Corallo
2017-09-30Remove unused fTry from push_lockJoão Barbosa
2017-08-16Use nullptr instead of zero (0) as the null pointer constantpracticalswift
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
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-
2017-06-22scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón
-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-
2017-06-05scripted-diff: Remove PAIRTYPEJorge Timón
-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-
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-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-
2017-03-17Remove unused codepracticalswift
2017-02-07Further-enforce lockordering by enforcing directly after TRY_LOCKsMatt Corallo
2017-02-02Always enforce lock strict lock ordering (try or not)Matt Corallo
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-04-10Clean up lockorder data of destroyed mutexesPieter Wuille
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.
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-08-07Revert "Revert "Assert on probable deadlocks if the second lock isnt try_lock""Cory Fields
This reverts commit a4fe57da6207c1e5691a1e843d22db571f3f0186. The issue here should be fixed by the previous commit.
2015-08-06Revert "Assert on probable deadlocks if the second lock isnt try_lock"Wladimir J. van der Laan
Disabling this for now - too many intermittent Travis issues. This reverts commit 0fcc4e1e04082daf6e97e05bfb26e4b94e54ea53 (pull #5515).
2015-07-22Assert on probable deadlocks if the second lock isnt try_lockMatt Corallo
2015-04-24Remove broken+useless lock/unlock log printsMatt Corallo
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-09-14header include cleanupPhilip Kaufmann
- ensures alphabetical ordering for includes etc. in source file headers
2014-08-28Fix build with DEBUG_LOCKORDERWladimir J. van der Laan
Fixes #4771
2014-02-18Wallet locking fixes for -DDEBUG_LOCKORDERGavin Andresen
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.
2014-01-23Remove redundant .c_str()sWladimir J. van der Laan
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.
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-20Make -DDEBUGLOCKORDER + -debug less noisyGavin Andresen
Print out every mutex lock/unlock if compiled -DDEBUGLOCKORDER only if -debug=lock is set.
2013-09-18Replace printf with LogPrintf / LogPrintGavin Andresen
2012-09-18Trim trailing whitespace for src/*.{h,cpp}Jeff Garzik
2012-06-29Fix a few typosfanquake
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