From a62ab9a7f4ba767ff8dfd1c9ad8acbbc99ef9bb8 Mon Sep 17 00:00:00 2001 From: Dwight Date: Thu, 17 Nov 2011 10:54:42 -0500 Subject: [PATCH] prep --- db/d_concurrency.cpp | 14 ++++++++++++++ db/database.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/db/d_concurrency.cpp b/db/d_concurrency.cpp index 6c6bdf60be4..adcae538aa7 100644 --- a/db/d_concurrency.cpp +++ b/db/d_concurrency.cpp @@ -9,9 +9,23 @@ using namespace std; namespace mongo { +#if defined(CLC) + + static void dbLock(Client& c) { + Client::LockStatus& s = c.lockStatus; + if( s.db++ == 0 ) { // i.e. allow recursive + } + } + LockCollectionForReading::LockCollectionForReading(const char *ns) { + Client& c = cc(); + lockDb(c); + + //... } +#endif + } diff --git a/db/database.h b/db/database.h index 384494cb119..783709c8fba 100644 --- a/db/database.h +++ b/db/database.h @@ -130,7 +130,7 @@ namespace mongo { CCByLoc ccByLoc; int magic; // used for making sure the object is still loaded in memory - RWLockBase dbLock; // d_concurrency.h + RWLockBase dbLock; // see d_concurrency.h }; } // namespace mongo