Files
mongo/db/d_concurrency.cpp

32 lines
566 B
C++
Raw Normal View History

2011-11-17 08:04:44 -05:00
#include "../pch.h"
#include "database.h"
#include "d_concurrency.h"
#include "../util/concurrency/threadlocal.h"
#include "../util/concurrency/rwlock.h"
#include "client.h"
using namespace std;
namespace mongo {
2011-11-17 10:54:42 -05:00
#if defined(CLC)
static void dbLock(Client& c) {
Client::LockStatus& s = c.lockStatus;
if( s.db++ == 0 ) { // i.e. allow recursive
}
}
2011-11-17 08:04:44 -05:00
LockCollectionForReading::LockCollectionForReading(const char *ns)
{
2011-11-17 10:54:42 -05:00
Client& c = cc();
lockDb(c);
2011-11-17 08:04:44 -05:00
//...
}
2011-11-17 10:54:42 -05:00
#endif
2011-11-17 08:04:44 -05:00
}