diff -r 185201be11b0 -r 516af714ebb4 perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperCondVar.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperCondVar.cpp Fri Sep 17 08:38:31 2010 +0300 @@ -0,0 +1,80 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include + +// Driver includes +#include + +// User includes +#include + + + +CMemSpyEngineHelperCondVar::CMemSpyEngineHelperCondVar( CMemSpyEngine& aEngine ) +: iEngine( aEngine ) + { + } + + +CMemSpyEngineHelperCondVar::~CMemSpyEngineHelperCondVar() + { + } + + +void CMemSpyEngineHelperCondVar::ConstructL() + { + } + + +CMemSpyEngineHelperCondVar* CMemSpyEngineHelperCondVar::NewL( CMemSpyEngine& aEngine ) + { + CMemSpyEngineHelperCondVar* self = new(ELeave) CMemSpyEngineHelperCondVar( aEngine ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +EXPORT_C void CMemSpyEngineHelperCondVar::GetCondVarSuspendedThreadsL( const TMemSpyDriverHandleInfoGeneric& aCondVarDetails, RArray& aThreads ) + { + const TInt KMaxCount = 256; + TAny* handles[KMaxCount]; + TInt c = KMaxCount; + + TInt r = iEngine.Driver().GetCondVarSuspendedThreads( aCondVarDetails.iHandle, handles, c ); + if ( r == KErrNone ) + { + if ( c > 0 ) + { + if (c > KMaxCount) + { + c = KMaxCount; + } + + TMemSpyDriverCondVarSuspendedThreadInfo info; + for (TInt i=0; i