00001 // @file curop-inl.h 00002 00019 #pragma once 00020 00021 #include "curop.h" 00022 00023 namespace mongo { 00024 00025 // todo : move more here 00026 00027 inline CurOp::CurOp( Client * client , CurOp * wrapped ) { 00028 _client = client; 00029 _wrapped = wrapped; 00030 if ( _wrapped ) 00031 _client->_curOp = this; 00032 _start = _checkpoint = 0; 00033 _active = false; 00034 _reset(); 00035 _op = 0; 00036 // These addresses should never be written to again. The zeroes are 00037 // placed here as a precaution because currentOp may be accessed 00038 // without the db mutex. 00039 memset(_ns, 0, sizeof(_ns)); 00040 } 00041 00042 }