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