0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix recent breakage of mutexdebuger (affected _DEBUG only)

This commit is contained in:
dwight 2010-08-15 23:10:36 -04:00
parent d40cac6f1b
commit 95313f7d4a

View File

@ -49,7 +49,8 @@ namespace mongo {
void programEnding();
MutexDebugger();
void entering(mid m) {
if( magic != 0x12345678 ) return;
if( this == 0 ) return;
assert( magic == 0x12345678 );
Preceeding *_preceeding = us.get();
if( _preceeding == 0 )
@ -108,7 +109,7 @@ namespace mongo {
}
}
void leaving(mid m) {
if( magic != 0x12345678 ) return;
if( this == 0 ) return; // still in startup pre-main()
Preceeding& preceeding = *us.get();
preceeding[m]--;
if( preceeding[m] < 0 ) {