João Barbosa
92848e5058
Remove unused fTry from push_lock
7 years ago
practicalswift
36d326e8b0
Use nullptr instead of zero (0) as the null pointer constant
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal 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-
7 years ago
Jorge Timón
5995735c5b
scripted-diff: Remove #include <boost/foreach.hpp>
...
-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-
8 years ago
Jorge Timón
1238f13cf6
scripted-diff: Remove PAIRTYPE
...
-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-
8 years ago
Jorge Timón
7c00c26726
scripted-diff: Fully remove BOOST_FOREACH
...
-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-
8 years ago
practicalswift
8dc957ae06
Remove unused code
8 years ago
Matt Corallo
618ee9249b
Further-enforce lockordering by enforcing directly after TRY_LOCKs
8 years ago
Matt Corallo
8465631845
Always enforce lock strict lock ordering (try or not)
8 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
Pieter Wuille
5eeb913d6c
Clean up lockorder data of destroyed mutexes
...
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.
9 years ago
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
9 years ago
Cory Fields
9493803f4a
Revert "Revert "Assert on probable deadlocks if the second lock isnt try_lock""
...
This reverts commit a4fe57da62
.
The issue here should be fixed by the previous commit.
9 years ago
Wladimir J. van der Laan
a4fe57da62
Revert "Assert on probable deadlocks if the second lock isnt try_lock"
...
Disabling this for now - too many intermittent Travis issues.
This reverts commit 0fcc4e1e04
(pull #5515 ).
9 years ago
Matt Corallo
0fcc4e1e04
Assert on probable deadlocks if the second lock isnt try_lock
9 years ago
Matt Corallo
1ec900a29e
Remove broken+useless lock/unlock log prints
10 years ago
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
10 years ago
Michael Ford
78253fcbad
Remove references to X11 licence
10 years ago
Pieter Wuille
20e01b1a03
Apply clang-format on some infrequently-updated files
10 years ago
Philip Kaufmann
611116d4e3
header include cleanup
...
- ensures alphabetical ordering for includes etc. in source file headers
10 years ago
Wladimir J. van der Laan
d2d6f708e4
Fix build with DEBUG_LOCKORDER
...
Fixes #4771
10 years ago
Gavin Andresen
ca4cf5cff6
Wallet locking fixes for -DDEBUG_LOCKORDER
...
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.
11 years ago
Wladimir J. van der Laan
7d9d134bf9
Remove redundant .c_str()s
...
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.
11 years ago
Wladimir J. van der Laan
19a5676280
Use mutex pointer instead of name for AssertLockHeld
...
This makes it useable for non-global locks such as the wallet and
keystore locks.
11 years ago
Gavin Andresen
c649637b6c
mutex debugging routines: LocksHeld() and AssertLockHeld()
11 years ago
Brandon Dahler
51ed9ec971
Cleanup code using forward declarations.
...
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.
11 years ago
Gavin Andresen
3b9ecfed82
Make -DDEBUGLOCKORDER + -debug less noisy
...
Print out every mutex lock/unlock if compiled -DDEBUGLOCKORDER
only if -debug=lock is set.
11 years ago
Gavin Andresen
881a85a22d
Replace printf with LogPrintf / LogPrint
11 years ago
Jeff Garzik
ea0796bde3
Trim trailing whitespace for src/*.{h,cpp}
12 years ago
fanquake
e749405297
Fix a few typos
13 years ago
Matt Corallo
4d009243cb
Fix DEBUG_LOCKCONTENTION
13 years ago
Pieter Wuille
660ff174f2
Use boost::thread locking instead of interprocess
13 years ago
Fordy
3a25a2b9b0
Update License in File Headers
...
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.
13 years ago
Pieter Wuille
7f3ccb59da
Split synchronization mechanisms from util.{h,cpp}
13 years ago