perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanContainers.cpp
changeset 62 1c2bb2fc7c87
parent 51 98307c651589
equal deleted inserted replaced
56:aa2539c91954 62:1c2bb2fc7c87
   740 
   740 
   741         DMemSpyDriverOSAdaptionDPropertyRef& pra = OSAdaption().DPropertyRef();
   741         DMemSpyDriverOSAdaptionDPropertyRef& pra = OSAdaption().DPropertyRef();
   742         const TBool isReady = pra.GetIsReady( *object );
   742         const TBool isReady = pra.GetIsReady( *object );
   743         TRACE( Kern::Printf("DMemSpyDriverLogChanContainers::GetPAndSInfo() - isReady: %d", isReady ));
   743         TRACE( Kern::Printf("DMemSpyDriverLogChanContainers::GetPAndSInfo() - isReady: %d", isReady ));
   744 
   744 
       
   745         TMemSpyDriverPAndSInfo params;
   745         if  ( isReady )
   746         if  ( isReady )
   746             {
   747             {
   747             TMemSpyDriverPAndSInfo params;
   748             //TMemSpyDriverPAndSInfo params;
   748             //
   749             //
   749             params.iType = pra.GetType( *object );
   750             params.iType = pra.GetType( *object );
   750             params.iCategory = pra.GetCategory( *object );
   751             params.iCategory = pra.GetCategory( *object );
   751             params.iKey = pra.GetKey( *object );
   752             params.iKey = pra.GetKey( *object );
   752             params.iRefCount = pra.GetRefCount( *object );
   753             params.iRefCount = pra.GetRefCount( *object );
   753             params.iTid = pra.GetThreadId( *object );
   754             params.iTid = pra.GetThreadId( *object );
   754             params.iCreatorSID = pra.GetCreatorSID( *object );
   755             params.iCreatorSID = pra.GetCreatorSID( *object );
   755             //
   756             //
   756             TRACE( Kern::Printf("DMemSpyDriverLogChanContainers::GetPAndSInfo - writing back to client thread..."));
   757             TRACE( Kern::Printf("DMemSpyDriverLogChanContainers::GetPAndSInfo - writing back to client thread..."));
   757             r = Kern::ThreadRawWrite( &ClientThread(), aInfo, &params, sizeof( TMemSpyDriverPAndSInfo ) );
   758             //r = Kern::ThreadRawWrite( &ClientThread(), aInfo, &params, sizeof( TMemSpyDriverPAndSInfo ) );
       
   759             r = KErrNone; //--
   758             }
   760             }
   759         else
   761         else
   760             {
   762             {
   761             r = KErrNotReady;
   763             r = KErrNotReady;
   762             }
   764             }
   763 
   765 
   764         NKern::UnlockSystem();
   766         NKern::UnlockSystem();
       
   767         //--
       
   768         if( r == KErrNone )
       
   769         	{
       
   770 			r = Kern::ThreadRawWrite( &ClientThread(), aInfo, &params, sizeof( TMemSpyDriverPAndSInfo ) );
       
   771         	}
       
   772         
       
   773         //--
   765 		object->Close(NULL);
   774 		object->Close(NULL);
   766         }
   775         }
   767 
   776 
   768     NKern::ThreadLeaveCS();
   777     NKern::ThreadLeaveCS();
   769 
   778 
   868     TInt r = Kern::ThreadRawRead( &ClientThread(), aParams, &params, sizeof(TMemSpyDriverCondVarSuspendedThreadInfo) );
   877     TInt r = Kern::ThreadRawRead( &ClientThread(), aParams, &params, sizeof(TMemSpyDriverCondVarSuspendedThreadInfo) );
   869     if  ( r != KErrNone )
   878     if  ( r != KErrNone )
   870         {
   879         {
   871         TRACE( Kern::Printf("DMemSpyDriverLogChanMisc::GetCondVarSuspThrInfo() - END - params read error: %d", r));
   880         TRACE( Kern::Printf("DMemSpyDriverLogChanMisc::GetCondVarSuspThrInfo() - END - params read error: %d", r));
   872         return r;
   881         return r;
   873         }
   882         }        
   874     
       
   875     DMemSpyDriverOSAdaptionDThread& threadAdaption = OSAdaption().DThread();
       
   876 
   883 
   877     NKern::ThreadEnterCS();
   884     NKern::ThreadEnterCS();
   878 
   885 
   879     DObject* threadHandle = (DObject*) aThreadHandle;
   886     DObject* threadHandle = (DObject*) aThreadHandle;
   880     threadHandle = CheckedOpen(EMemSpyDriverContainerTypeThread, threadHandle);
   887     threadHandle = CheckedOpen(EMemSpyDriverContainerTypeThread, threadHandle);