elements/src
Pieter Wuille 712fd182b7 Locking system overhaul, add condition variables
This commit simplifies the locking system: CCriticalSection becomes a
simple typedef for boost::interprocess::interprocess_recursive_mutex,
and CCriticalBlock and CTryCriticalBlock are replaced by a templated
CMutexLock, which wraps boost::interprocess::scoped_lock.

By making the lock type a template parameter, some critical sections
can now be changed to non-recursive locks, which support waiting via
condition variables. These are implemented in CWaitableCriticalSection
and WAITABLE_CRITICAL_BLOCK.

CWaitableCriticalSection is a wrapper for a different Boost mutex,
which supports waiting/notification via condition variables. This
should enable us to remove much of the used polling code. Important
is that this mutex is not recursive, so functions that perform the
locking must not call eachother.

Because boost::interprocess::scoped_lock does not support assigning
and copying, I had to revert to the older CRITICAL_BLOCK macros that
use a nested for loop instead of a simple if.
2012-04-04 16:21:08 +02:00
..
json Back out spacing changes to json spirit code 2012-01-19 14:32:45 -05:00
obj Boost unit-testing framework. 2011-06-27 14:12:48 -04:00
obj-test Rename src/obj/test to src/obj-test to workaround bug in older GNU Make 2012-01-23 14:27:08 -05:00
qt Merge pull request #1019 from laanwj/2012_03_uirefactor 2012-04-04 05:03:07 -07:00
test DoS fix for mapOrphanTransactions 2012-02-29 11:46:46 -05:00
addrman.cpp CAddrMan: stochastic address manager 2012-02-24 13:41:04 +01:00
addrman.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
allocators.h remove dependency on serialize.h and util.h for SecureString 2012-04-04 09:35:01 +02:00
base58.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
bignum.h fixed typo in comment in netbase.h and bignum.h 2012-03-30 07:44:35 +02:00
bitcoinrpc.cpp Use a messagebox to display the error when -server is provided without providing a rpc password 2012-04-04 09:37:26 +02:00
bitcoinrpc.h Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
checkpoints.cpp Checkpoint block 168,000 2012-02-23 13:33:30 -05:00
checkpoints.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
compat.h Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
crypter.cpp Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
crypter.h remove dependency on serialize.h and util.h for SecureString 2012-04-04 09:35:01 +02:00
db.cpp Merge pull request #1010 from sipa/fastblocks2 2012-03-29 12:10:30 -07:00
db.h Merge branch 'master' of github.com:bitcoin/bitcoin 2012-03-26 15:31:32 -04:00
headers.h Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
init.cpp qtui.h/noui.h interface cleanup 2012-04-04 09:37:25 +02:00
init.h Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
irc.cpp CAddrMan: stochastic address manager 2012-02-24 13:41:04 +01:00
irc.h Fix #626: RecvLine wrong error message 2012-02-19 19:06:42 +01:00
key.cpp Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
key.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
keystore.cpp Move GenerateNewKey back to CWallet 2012-02-18 15:42:38 +01:00
keystore.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
main.cpp qtui.h/noui.h interface cleanup 2012-04-04 09:37:25 +02:00
main.h VC2010 compile fixes 2012-04-03 20:22:41 +02:00
makefile.linux-mingw Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
makefile.mingw Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
makefile.osx Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
makefile.unix Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
mruset.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
net.cpp Give DNS seeds a random age between 3 and 7 days old 2012-03-25 16:06:16 +02:00
net.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
netbase.cpp CAddrMan: stochastic address manager 2012-02-24 13:41:04 +01:00
netbase.h VC2010 compile fixes 2012-04-03 20:22:41 +02:00
noui.cpp Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
protocol.cpp Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
protocol.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
rpcdump.cpp Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
script.cpp Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
script.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
serialize.h remove dependency on serialize.h and util.h for SecureString 2012-04-04 09:35:01 +02:00
strlcpy.h move back to original directory structure 2011-06-11 22:11:58 +02:00
ui_interface.h Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon. 2012-04-04 13:19:30 +02:00
uint256.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00
util.cpp Locking system overhaul, add condition variables 2012-04-04 16:21:08 +02:00
util.h Locking system overhaul, add condition variables 2012-04-04 16:21:08 +02:00
wallet.cpp qtui.h/noui.h interface cleanup 2012-04-04 09:37:25 +02:00
wallet.h Begin doxygen-compatible comments 2012-03-26 16:48:23 +02:00