aboutsummaryrefslogtreecommitdiff
path: root/src/sync.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-04-20 13:32:01 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-04-20 13:32:04 +0200
commit6a0bcb80e4ce380a39f81b4fb01150d5b7e6cdf7 (patch)
tree1fceda4c3e22874df27471848264ec890837dfcb /src/sync.h
parent4a884aedcd451fe549ff230a076277d666df2770 (diff)
parentc6de7c35bcfb71deca56620415c0c342f6b7d499 (diff)
Merge pull request #6004
c6de7c3 trivial string change in wallet.cpp (the -> that) (Philip Kaufmann) 1e3473d Add operator names to DNS Seed list (Michael Ford) a21df62 ensure consistent header comment naming conventions (Philip Kaufmann) 9e16cb1 Make 'Default: %u' spacing consistent in help message (Wladimir J. van der Laan) 6cb37a3 [Qt, Trivial] remove two unneeded includes of wallet/db.h (Philip Kaufmann) 68f795e [Qt, Trivial] fix header groupings + space, intdentation fixes (Philip Kaufmann) 985ec17 [Qt, Trivial] misc minor string changes (Philip Kaufmann) c0555dc depends: latest config.guess and config.sub (Michael Ford) 89fc6b6 Remove leftover strlcpy.h copyright (Rob Van Mieghem) 468aa3b Re-wrote a passage of text that was difficult to understand. (Jason Lewicki) 71ad6bd [Trivial] format sync.h (Philip Kaufmann) abcec30 Update REST URL to match reality (paveljanik) 447d37e Use https link to bitcoin.org in Doxygen intro (Michael Ford) c069234 Fix typo in init.cpp interpration/interpretation (Michael Ford) 52070c8 Removed '()' where used without contents inside (Nicolas Benoit) 30c1db1 Replaced current function names with __func__ in LogPrintf() calls. (Nicolas Benoit) 9bdd03f Point to the Debian 7.8 installer (Michael Ford) 0b2f930 Fix docs for 'complete' field in 'signrawtransaction' response (charlescharles) c2f2161 Add x86_64* i686* mips* and arm* to depends .gitignore (Michael Ford) fa535f9 Remove folder and images for bootstrap.md (sandakersmann) 60c1469 [Qt] header group cleanup (Philip Kaufmann)
Diffstat (limited to 'src/sync.h')
-rw-r--r--src/sync.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/sync.h b/src/sync.h
index 27e80e813b..78b9043477 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -21,9 +21,6 @@
////////////////////////////////////////////////
/*
-
-
-
CCriticalSection mutex;
boost::recursive_mutex mutex;
@@ -42,20 +39,18 @@ ENTER_CRITICAL_SECTION(mutex); // no RAII
LEAVE_CRITICAL_SECTION(mutex); // no RAII
mutex.unlock();
-
-
-
*/
-
///////////////////////////////
// //
// THE ACTUAL IMPLEMENTATION //
// //
///////////////////////////////
-// Template mixin that adds -Wthread-safety locking annotations to a
-// subset of the mutex API.
+/**
+ * Template mixin that adds -Wthread-safety locking
+ * annotations to a subset of the mutex API.
+ */
template <typename PARENT>
class LOCKABLE AnnotatedMixin : public PARENT
{
@@ -76,8 +71,10 @@ public:
}
};
-/** Wrapped boost mutex: supports recursive locking, but no waiting */
-// TODO: We should move away from using the recursive lock by default.
+/**
+ * Wrapped boost mutex: supports recursive locking, but no waiting
+ * TODO: We should move away from using the recursive lock by default.
+ */
typedef AnnotatedMixin<boost::recursive_mutex> CCriticalSection;
/** Wrapped boost mutex: supports waiting but not recursive locking */
@@ -92,9 +89,7 @@ void LeaveCritical();
std::string LocksHeld();
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs);
#else
-void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false)
-{
-}
+void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {}
void static inline LeaveCritical() {}
void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {}
#endif